Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
bendangnuksung committed Jan 22, 2020
1 parent 0fcdc48 commit 29d1202
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,24 @@ config = your_custom_config_class
### Inferencing
Follow once you finish converting it to a `saved_model` using the above code

#### Tensorflow Model Server with GRPC
#### Tensorflow Model Server with GRPC and RESTAPI

1. First run your `saved_model.pb` in Tensorflow Model Server, using:
```bash
tensorflow_model_server --port=8500 --model_name=mask --model_base_path=/path/to/saved_model/
tensorflow_model_server --port=8500 --rest_api_port=8501 --model_name=mask --model_base_path=/path/to/saved_model/
```
2. Modify the variables and add your Config Class if needed in `inferencing/saved_model_config.py`. No need to change if the saved_model is the default COCO model.
3. Then run the `inferencing/saved_model_inference.py` with the image path:
```bash
# Set Python Path
export PYTHONPATH=$PYTHONPATH:$pwd
# Run Inference
python3 inferencing/saved_model_inference.py -p test_image/monalisa.jpg
```

#### Please do send a PR if you know to inference using TF model server RESTAPI.

# Run Inference with GRPC
python3 inferencing/saved_model_inference.py -t grpc -p test_image/monalisa.jpg
# Run Inference with RESTAPI
python3 inferencing/saved_model_inference.py -t restapi -p test_image/monalisa.jpg
```

### Acknowledgement
Thanks to [@rahulgullan](https://github.com/rahulgullan) for RESTAPI client code.

0 comments on commit 29d1202

Please sign in to comment.