Hugging Face

Deploying TensorFlow Vision Models in Hugging Face with TF Serving

Jul 25, 2022
Deploying TensorFlow Vision Models in Hugging Face with TF Serving
SummaryAI, from the source post

This post details how to deploy a Vision Transformer (ViT) model locally using TensorFlow Serving (TF Serving). It covers saving the model in the SavedModel format, performing model surgery to embed preprocessing (image scaling, normalization, resizing) and postprocessing (mapping logits to ImageNet-1k classes) into the computation graph, and exporting the model with a signature that accepts string inputs for images. It then demonstrates deploying the model with `tensorflow_model_server` and querying the REST and gRPC endpoints.

More from the Kubernetes Deployment of Vision Transformers with TF Serving trail