You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by da...@apache.org on 2023/03/27 16:22:01 UTC
[beam] 01/01: Update README.md
This is an automated email from the ASF dual-hosted git repository.
damccorm pushed a commit to branch users/damccorm/tfhub_example
in repository https://gitbox.apache.org/repos/asf/beam.git
commit b54560f87ed547c2c85b357eaceab02ad595334a
Author: Danny McCormick <da...@google.com>
AuthorDate: Mon Mar 27 12:21:52 2023 -0400
Update README.md
---
sdks/python/apache_beam/examples/inference/README.md | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/sdks/python/apache_beam/examples/inference/README.md b/sdks/python/apache_beam/examples/inference/README.md
index f769e82bf22..bf67abc83e3 100644
--- a/sdks/python/apache_beam/examples/inference/README.md
+++ b/sdks/python/apache_beam/examples/inference/README.md
@@ -497,12 +497,13 @@ grace_hopper.jpg
```
3. A tensorflow `MODEL_PATH`, we will use the [mobilenet]("https://tfhub.dev/google/tf2-preview/mobilenet_v2/classification/4") model.
4. Note the path to the `OUTPUT` file. This file is used by the pipeline to write the predictions.
+5. Install TensorflowHub: `pip install tensorflow_hub`
-### Running `tensorflow_image_segmentation.py`
+### Running `tensorflow_imagenet_segmentation.py`
To run the image segmentation pipeline locally, use the following command:
```sh
-python -m apache_beam.examples.inference.tensorflow_image_segmentation \
+python -m apache_beam.examples.inference.tensorflow_imagenet_segmentation \
--input IMAGE_FILE_NAMES \
--image_dir IMAGES_DIR \
--output OUTPUT \
@@ -511,9 +512,9 @@ python -m apache_beam.examples.inference.tensorflow_image_segmentation \
For example, if you've followed the naming conventions recommended above:
```sh
-python -m apache_beam.examples.inference.tensorflow_image_segmentation \
+python -m apache_beam.examples.inference.tensorflow_imagenet_segmentation \
--input IMAGE_FILE_NAMES.txt \
- --image_dir "https://storage.googleapis.com/download.tensorflow.org/example_images/"
+ --image_dir "https://storage.googleapis.com/download.tensorflow.org/example_images/" \
--output predictions.txt \
--model_path "https://tfhub.dev/google/tf2-preview/mobilenet_v2/classification/4"
```
@@ -642,4 +643,4 @@ When all elements are in a single batch the output looks like this:
```
0,[1 1 1 0 0 0 0 1 2 0 0 2 0 2 1 2 2 2 2 0 0 0 0 2 2 0 2 2 2 1]
-```
\ No newline at end of file
+```