tensorflow / models

Models and examples built with TensorFlow
Other
77k stars 45.78k forks source link

Problem with research/object_detection/export_inference_graph.py #2714

Closed daavoo closed 6 years ago

daavoo commented 6 years ago

System information

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 commented 6 years ago

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

bignamehyp commented 6 years ago

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

tombstone commented 6 years ago

@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 ?

daavoo commented 6 years ago

I'll try that as soon as possible

tombstone commented 6 years ago

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

daavoo commented 6 years ago

Can confirm that I'm not having the problem anymore

El 18 nov. 2017 7:38, "vivek rathod" notifications@github.com 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 .

tombstone commented 6 years ago

@daavoo Thanks!

mrfortynine commented 6 years ago

@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 commented 6 years ago

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 commented 6 years ago

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.

CBHealth commented 6 years ago

What changes for using faster R-CNN?

paviddavid commented 5 years ago

@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?