How do I convert Niftynet models into .pb format

88 views Asked by At

I would like to use models in Niftynet zoo in tensorflowjs.

When I download models from Niftynet zoo they are in checkpoint format (ckpt). However, tensorflowjs expects the models to be in pb format. Also, checkpoint format does not contain graph information so we need to save the model using simple_save or similar API [1].

So what I intend to do is to do:

  1. Download a model from Niftynet zoo
  2. Restore it. (I need help in this step)
  3. Save the complete model using simple_save api. This will result in .pb model. (I need help in this step)
  4. Use tensorflowjs-converter [2] to convert it into pb format which can be consumed by tensorflowjs.

So can someone from niftynet community help me with steps 2 and 3: how to load a model using the checkpoint files and configuration file and save it completely using the simple_save api.

  1. https://www.tensorflow.org/guide/saved_model
  2. https://js.tensorflow.org/tutorials/import-saved-model.html
0

There are 0 answers