Skip to content

In this application we build an API endpoint for the Tensorflow Object Detection API and deploy it on Google Kubernetes Engine. The user hits the endpoint with image data and gets a response which consists of detections with scores, image data with overlay, image size (can be customized).

Notifications You must be signed in to change notification settings

wingedrasengan927/Tensorflow-2-Object-Detection-API-Flask-Application

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tensorflow-2-Object-Detection-API-Flask-Application

This is a flask application with tensorflow 2 object detection API deployed. The user hits the endpoint with image data and gets a response which consists of detections with scores, image data with overlay, image size (can be customized).

Prerequisites and Setup

  • You need to setup the tensorflow object detection API. Here are some of the great articles that will help you in the process, tutorial1, tutorial2.
  • You can the download the required model from tensorflow model zooand specify the saved_model, labelmap path in the main.py file
  • client.py is used hit the endpoint. You have to specify the url with endpoint, image_path, output_dir(the dir where you want your image with overlay to be saved. It's optional), in the client.py file.

Run

  • first run python main.py to get the app running and then to hit the endpoint with required arguments, run python client.py

Output

The response consists of

  • detections with scores
  • image data with overlay. This can be decoded back to a numpy array and can be written to disk to visualize the result (provided in client.py)
  • image size

Associated Article

https://medium.com/@ms.neerajkrishna/deploy-tensorflow-object-detection-api-on-kubernetes-with-python-flask-and-docker-7a9513dd19e4

References

About

In this application we build an API endpoint for the Tensorflow Object Detection API and deploy it on Google Kubernetes Engine. The user hits the endpoint with image data and gets a response which consists of detections with scores, image data with overlay, image size (can be customized).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published