0

I do auto detection with model, but I can't read model .pb

from imageai.Detection import VideoObjectDetection
import os

execution_path = os.getcwd()

detector = VideoObjectDetection()
detector.setModelTypeAsYOLOv3()
detector.setModelPath( os.path.join(execution_path , "saved_model.pb"))
detector.loadModel()
Tee Adkins
  • 43
  • 4
  • [this](https://stackoverflow.com/questions/45466020/how-to-export-keras-h5-to-tensorflow-pb) post may help you – kiranr Feb 09 '21 at 09:41
  • Please **re-read** [How to ask](https://stackoverflow.com/help/how-to-ask), as it would seem that you missed some crucial points the first time you read it, namely "***DO NOT post images of code, data, error messages, etc.** - copy or type the text into the question*" (emphasis in the original). Plus, any code that comes *after* the error is irrelevant to the issue (never executed) and it should not be included here (edited out). – desertnaut Feb 12 '21 at 12:43
  • To convert `.h5` to `.pb` format of your model use the following code, `tf.keras.models.load_model(keras_model_path)` this loads `.h5` file and save the model as `.pb` using `tf.saved_model.save(model, saved_model_path)` –  Jun 04 '21 at 01:54

0 Answers0