How to convert frozen inference graph or frozen inference graph to SavedModel - tensorflow

I have a frozen inference graph(frozen_inference_graph.pb) and a checkpoint (model.ckpt.data-00000-of-00001, model.ckpt.index), how to deploy these to Tensorflow serving? serving need SavedModel format, how to convert to it?
I study Tensorflow and found Deeplab v3+ provide PASCAL VOC 2012 model, I run train, eval, visualization on my local PC, but I don't know how to deploy it on serving.

Have you tried export_inference_graph.py?
Prepares an object detection tensorflow graph for inference using model
configuration and a trained checkpoint. Outputs inference
graph, associated checkpoint files, a frozen inference graph and a
SavedModel

Related

How to transfer learning or fine tune tensorflow lite tflite

I have a darknet yolov4 model that is converted to tflite file and trained by COCO dataset for object detection.
I want to train that for my traffic sign dataset. (GTSDB)
How should I do that for my tflite file?
I don't want to do that in darknet and then convert to tflite. I want to transfer learning directly from tflite file.

How was the ssd_mobilenet_v1 tflite model in TFHub trained?

How do I find more info on how the ssd_mobilenet_v1 tflite model on TFHub was trained?
Was it trained in such a way that made it easy to convert it to tflite by avoiding certain ops not supported by tflite? Or was it trained normally, and then converted using the tflite converter with TF Select and the tips on this github issue?
Also, does anyone know if there's an equivalent mobilenet tflite model trained on OpenImagesV6? If not, what's the best starting point for training one?
I am not sure about about the exact origin of the model, but looks like it does have TFLite-compatible ops. From my experience, the best place to start for TFLite-compatible SSD models is with the TF2 Detection Zoo. You can convert any of the SSD models using these instructions.
To train your own model, you can follow these instructions that leverage Google Cloud.

Tensorflow Frozen Graph to SavedModel

I've been trying to use tensorflow.js, but I need the model in the SavedModel format. So far, I only have the Frozen Graph, as I used Tensorflow for Poets Codelab.
How can I convert the Frozen Graph into SavedModel?
I've been using the latest Python version and Tensorflow 1.8
The SavedModel is really just a wrapper around a frozen graph that provides assets and the serving signature. For a code implementation, see this answer.

How to use a pre trained model on Image net in tensorflow object detection api

I am trying to use the Inception SSD model in tensorflow object detection API. To initialize the weights i want to use pretrained Inception V2 On image net as the feature extractor. I see the model config file lets you use a pretrained model on COCO but if I want to use an Image net model how should I go about it?
To train on Imagenet classification models, do the following:
1) Download a pre-trained model from the "Pre-trained models" section on the Slim page
2) Point the fine_tune_checkpoint at that directory
3) Set from_detection_checkpoint to be false (as you will now be fine-tuning from a classification checkpoint)
Note that training from an Imagenet classification checkpoint will require significantly more time.

Tensorflow inference for modified Inception V3 model

Went thru https://tensorflow.github.io/serving/serving_basic and was able to run inference MNIST example using Tensorflow Serving server.
Now, I would like to use a trained modified InceptionV3 model (which generates 2 files: .pb and .txt) to export and use it for inference.
Serving Basic tutorial use mnist_saved_model.py for training and exporting the model. Is this file to be modified for the trained modified InceptionV3 model? Also, what is the difference between mnist_saved_model.py and mnist_export.py?
Looked at How to serve the Tensorflow graph file (output_graph.pb) via Tensorflow serving? but the example mnist_saved_model.py creates a directory called 1 and subdirectories as shown below
$> ls /tmp/mnist_model/1
saved_model.pb variables
Thoughts??