Giter VIP home page Giter VIP logo

mrcnn_serving_ready's Introduction

MRCNN Model conversion

Script to convert MatterPort Mask_RCNN Keras model to Tensorflow Frozen Graph and Tensorflow Serving Model.
Plus inferencing with GRPC or RESTAPI using Tensorflow Model Server.

How to Run

  1. Modify the path variables in 'user_config.py'
  2. Run main.py
    python3 main.py

For Custom Config class

If you have a different config class you can replace the existing config in 'main.py'

# main.py
# Current config load
config = get_config()

# replace it with your config class
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 and RESTAPI

  1. First run your saved_model.pb in Tensorflow Model Server, using:
    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:
    # Set Python Path
    export PYTHONPATH=$PYTHONPATH:$pwd
    
    # 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 for RESTAPI client code.

mrcnn_serving_ready's People

Contributors

bendangnuksung avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.