models icon indicating copy to clipboard operation
models copied to clipboard

NameError: name 'load_model' is not defined during the configuration of Object_detection_tutorial.ipynb

Open Anatolist opened this issue 6 years ago • 2 comments

Hello everyone, I have done the sentdex tutorials TensorFlow Object Detection API Tutorial and I faced an issue: When I configure the Object_detection_tutorial.ipynb (the file is different for that in tutorials) It's like https://github.com/tensorflow/models/blob/master/research/object_detection/object_detection_tutorial.ipynb and when I put my model on this I get an error :

My export model named phone_graph3

'model_name` = "phone_graph3"

masking_model = load_model("phone_graph3")

NameError Traceback (most recent call last) in 1 model_name = "phone_graph3" ----> 2 masking_model = load_model("phone_graph3")

NameError: name 'load_model' is not defined`

Is there any documentation about how to load my trained model. For the training, of my model, I used the ssd_mobilenet_v1_coco_11_06_2017.

Anatolist avatar Apr 21 '20 20:04 Anatolist

if you have trained your model, there is no use of load_model function as it downloads the pretrained-model Check this: https://github.com/AshishGusain17/via_google_colab/blob/master/sports_balls_detection_using_tf.ipynb

Once you have trained your model....use export_inference_graph.py to export inference graph and then use as given in the repo above

AshishGusain17 avatar May 06 '20 18:05 AshishGusain17

load_model is defined in the same file... you could modify the load_model fucntion to read your own frozen graph once trained (use export_inference_graph.py to produce frozen graph).

pkulzc avatar May 09 '20 23:05 pkulzc