What is the difference between tensorflow saved_model.pb and frozen_inference_graph.pb? I've re-trained a model (following this tutorial) from the google's object detection zoo (ssd_inception_v2_coco) on a WIDER Faces Dataset and it seems to work if I use frozen_inference_graph.pb from python, but if i take saved_model.pb and put it to tensorflow serving, it predicts a lot of detections all with confidence less than 0.10.

Another thing that I do not understand is that both files are 52Mb however the original files downloaded from the object detection zoo take 98Mb each.

Here's an example of predictions made with the saved_model and tensorflow serving:

 

And here's example of predictions by the same model, but using frozen_inference_graph.pb:




So what is the actual difference between the saved_model.pb and the frozen_inference_graph.pb?
Are there any ways to inspect what's wrong with the saved_model.pb i use?
How the much smaller size of the re-trained model vs the original could be explained?
saved_model.pb may represent multiple graph definitions as MetaGraphDef protocol buffers. Weights and other variables usually aren't stored inside the file during training. Instead, they're held in separate checkpoint files



.



frozen_inference_graph.pb has its variables converted into inline constants so everything’s in one file and ready for serving on any platform including mobile. Freezing process includes loading the GraphDef, pull in the values for all the variables from the latest checkpoint file, and then replace each Variable op with a Const that has the numerical data for the weights stored in its attributes It then strips away all the extraneous nodes that aren't used for forward inference. Reference: Tensorflow Model Files