models icon indicating copy to clipboard operation
models copied to clipboard

Problem with research/object_detection/export_inference_graph.py

Open daavoo opened this issue 9 years ago • 12 comments


System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 16.04
  • TensorFlow installed from (source or binary): binary
  • TensorFlow version (use command below): v1.4.0-rc1-11-g130a514 1.4.0
  • Exact command to reproduce:

Download and extract http://download.tensorflow.org/models/object_detection/ssd_mobilenet_v1_coco_11_06_2017.tar.gz to the research/object_detection folder

From research, run:

python export_inference_graph.py \
    --input_type image_tensor \
    --pipeline_config_path samples/configs/ssd_mobilenet_v1_coco.config \
    --trained_checkpoint_prefix ssd_mobilenet_v1_coco_11_06_2017/model.ckpt
    --output_directory exported_graph

And in object_detection/object_detection_tutorial.ipynb replace:

PATH_TO_CKPT = MODEL_NAME + '/frozen_inference_graph.pb'

With:

PATH_TO_CKPT = 'exported_graph/frozen_inference_graph.pb'


Describe the problem

I'm using export_inference_graph.py without running into any problem but when I use the exported frozen_inference_graph.pb in the object_detection_tutorial.ipynb it does not generate any predictions.

At first I though that it might be some problem with the custom pipeline.config file and dataset that I was using but I have the same problem using the provided sample configurations and pretrained model as specified in the above section.

daavoo avatar Nov 06 '17 13:11 daavoo

For the record, I get the "command to reproduce" working by reseting the repo to this commit and downgrading tensorflow to version 1.3

daavoo avatar Nov 06 '17 17:11 daavoo

@jch1 @tombstone can you please take a look at this issue? Thanks

bignamehyp avatar Nov 07 '17 01:11 bignamehyp

@daavoo, This should be fixed with latest commit. Can you use the new links in the model zoo, upgrade to TF 1.4 and retry ?

tombstone avatar Nov 09 '17 23:11 tombstone

I'll try that as soon as possible

daavoo avatar Nov 11 '17 05:11 daavoo

SSD models have been updated yet again. Please try the latest models. Feel free to reopen if you run into this problem again.

tombstone avatar Nov 18 '17 06:11 tombstone

Can confirm that I'm not having the problem anymore

El 18 nov. 2017 7:38, "vivek rathod" [email protected] escribió:

SSD models have been updated yet again. Please try the latest models. Feel free to reopen if you run into this problem again.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tensorflow/models/issues/2714#issuecomment-345422481, or mute the thread https://github.com/notifications/unsubscribe-auth/AMFyZV_fJPE2qgxh7IIJacKK-hn_YCI9ks5s3ntggaJpZM4QTNGy .

daavoo avatar Nov 18 '17 07:11 daavoo

@daavoo Thanks!

tombstone avatar Nov 18 '17 08:11 tombstone

@tombstone I ran into this issue with SSD model as well. Is this due to older SSD model not being compatible with recent export script? Is TF 1.4 required as long with new SSD model? Is there a workaround if I can't retrain with more recent SSD model not upgrade to TF 1.4 yet?

mrfortynine avatar Nov 20 '17 21:11 mrfortynine

It seems using latest SSD model alone (while still using TF 1.2) isn't enough to fix this problem. Again, I'm running into issue that requires TF 1.4. It would be great if we can keep this project working out of box with TF 1.2 since that's what's available on google ML engine.

mrfortynine avatar Nov 20 '17 21:11 mrfortynine

Reading the original issue report more closely, I realized that I'm seeing a different symptom. What I'm experiencing is that object_detection/export_inference_graph.py crashed when I try to export fine turned SSD model.

mrfortynine avatar Nov 20 '17 21:11 mrfortynine

What changes for using faster R-CNN?

CBHealth avatar Aug 08 '18 14:08 CBHealth

@blumenkindC3 Did you solve this issue for the faster rcnn?

I am also getting the same issue exporting an graph for inference for the faster rcnn model.. Any updates?

paviddavid avatar Apr 29 '19 11:04 paviddavid