I tried following Edje Electronics's tutorial on for training an object detector.
https://www.youtube.com/watch?v=Rgpfk6eYxJA
I have managed to train the model already. But I have problems with exporting inference graph.
TypeError: export_inference_graph() got an unexpected keyword argument 'use_side_inputs'
tensorflow version: 1.15
I have the exact same issue, while using tensorflow 1.14.0
TypeError: export_inference_graph() got an unexpected keyword argument 'use_side_inputs'
Any help would be appreciated.
I have the exact same issue, while using tensorflow 1.14.0
TypeError: export_inference_graph() got an unexpected keyword argument 'use_side_inputs'
Any help would be appreciated.
I somehow managed to get passed it. I'm thinking that the files we have are not compatible anymore. Some are updated while some are not. So I downloaded a very old version of the export_inference_graph.py from here:
And here are the codes to type instead:
python export_inference_graph.py --input_type image_tensor --pipeline_config_path training/faster_rcnn_inception_v2_pets.config --checkpoint_path training/model.ckpt-7359 --inference_graph_path output_inference_graph.pb
hope it helps you too
I have the exact same issue, while using tensorflow 1.14.0
TypeError: export_inference_graph() got an unexpected keyword argument 'use_side_inputs'
Any help would be appreciated.I somehow managed to get passed it. I'm thinking that the files we have are not compatible anymore. Some are updated while some are not. So I downloaded a very old version of the export_inference_graph.py from here:
And here are the codes to type instead:
python export_inference_graph.py --input_type image_tensor --pipeline_config_path training/faster_rcnn_inception_v2_pets.config --checkpoint_path training/model.ckpt-7359 --inference_graph_path output_inference_graph.pb
hope it helps you too
Thanks mehn, this worked! However I am concerned how efficient the process was.
Fingers crossed.
We kept updating the whole repo and it looks like your files are not sync'ed to the same stamp/commit.
Instead of downloading an old copy, you should sync your repo to latest :)
Following these instructions on colab
At this step:
!python /content/drive/'My Drive'/object_detection/models/research/object_detection/export_inference_graph.py \
--input_type=image_tensor \
--pipeline_config_path=/content/drive/'My Drive'/object_detection/models/research/object_detection/samples/configs/ssd_mobilenet_v2_coco.config \
--output_directory={output_directory} \
--trained_checkpoint_prefix={last_model_path}
I had same issue (TypeError: export_inference_graph() got an unexpected keyword argument 'use_side_inputs')
Tried with updated version of export_inference_graph.py, as suggested, and it didn't work (gave same error).
Tried with old version of export_inference_graph.py (as mentioned above), and it gave this error:
AssertionError: Inference graph path missing
Added 'inference_graph_path' line to code:
!python /content/drive/'My Drive'/object_detection/models/research/object_detection/export_inference_graph.py \
--input_type=image_tensor \
--pipeline_config_path=/content/drive/'My Drive'/object_detection/models/research/object_detection/samples/configs/ssd_mobilenet_v2_coco.config \
--inference_graph_path={output_directory} \
--output_directory={output_directory} \
--trained_checkpoint_prefix={last_model_path}
and got following error:
ValueError: ('%s is not decorated with @add_arg_scope', ('nets.mobilenet.mobilenet', 'depth_multiplier'))
Any ideas where I'm going wrong?
Sorry I just realised this question shouldn't be on here.
And I fixed it.
Should 've added 'inference_graph_path' line to code as:
--inference_graph_path output_inference_graph.pb \
Deleting the folder where your inference graph is saved (poker_inference_graph in your case) should work, it worked for me
Delete the variables and flags that refers to side_input should get rid of that error.
Can't guarantee if the network will still work as expected after this.
Here's the code:
https://gist.github.com/cheadrian/f02363499bdfa826b1c311c224c89215
Most helpful comment
I somehow managed to get passed it. I'm thinking that the files we have are not compatible anymore. Some are updated while some are not. So I downloaded a very old version of the export_inference_graph.py from here:
https://github.com/datitran/object_detector_app/blob/master/object_detection/g3doc/exporting_models.md
And here are the codes to type instead:
python export_inference_graph.py --input_type image_tensor --pipeline_config_path training/faster_rcnn_inception_v2_pets.config --checkpoint_path training/model.ckpt-7359 --inference_graph_path output_inference_graph.pb
hope it helps you too