New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ssd_mobilenet_v3_large_coco(Model Zoo) does not detect the object #7818
Comments
I concur that I see a similar problem. I'm testing with the latest 'tensorflow/models' code and TensorFlow 1.12.2. I also export frozen inference graphs of ssd_mobilenet_v3_large_coco and ssd_mobilenet_v3_small_coco by myself. Test results are:
|
Same. ssd_mobilenet_v3_large_coco cannot detect anything. |
I am able to reproduce the (bad) results from that model :-(. I have reached out to the research team internally, they are investigating... |
Looks like there was a problem with the model that was published, it should be updated in a couple of days or so... |
This PR should fix it, feel free to use the new links for download. |
I checked it with a new model. |
@srjoglekar246 Are there any architectural changes in the new model files (SSD MobileNet V3 files updated in the fix)? I converted the trained SSD MobileNet V3 Large from checkpoint to .pb and from checkpoints to .tflite too. I am getting detection boxes with the .pb format but .tflite format is detecting the random objects with very low confidence (<.15). |
Problems with architecture should ideally be caught during conversion. Did you use |
Yes, I am using SSD MobileNet V3 Large. I am using this config: https://github.com/tensorflow/models/blob/master/research/object_detection/samples/configs/ssdlite_mobilenet_v3_large_320x320_coco.config These are the conversion commands and the logs :
Logs : WARNING:tensorflow:From /workspace/models/research/slim/nets/mobilenet/mobilenet.py:397: The name tf.nn.avg_pool is deprecated. Please use tf.nn.avg_pool2d instead. WARNING:tensorflow:From object_detection/export_tflite_ssd_graph.py:145: The name tf.app.run is deprecated. Please use tf.compat.v1.app.run instead. WARNING:tensorflow:From object_detection/export_tflite_ssd_graph.py:135: The name tf.gfile.GFile is deprecated. Please use tf.io.gfile.GFile instead. W0211 12:14:05.292659 140575287248704 deprecation_wrapper.py:119] From object_detection/export_tflite_ssd_graph.py:135: The name tf.gfile.GFile is deprecated. Please use tf.io.gfile.GFile instead. WARNING:tensorflow:From /workspace/models/research/object_detection/export_tflite_ssd_graph_lib.py:193: The name tf.gfile.MakeDirs is deprecated. Please use tf.io.gfile.makedirs instead. W0211 12:14:05.313710 140575287248704 deprecation_wrapper.py:119] From /workspace/models/research/object_detection/export_tflite_ssd_graph_lib.py:193: The name tf.gfile.MakeDirs is deprecated. Please use tf.io.gfile.makedirs instead. WARNING:tensorflow:From /workspace/models/research/object_detection/export_tflite_ssd_graph_lib.py:237: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead. W0211 12:14:05.314558 140575287248704 deprecation_wrapper.py:119] From /workspace/models/research/object_detection/export_tflite_ssd_graph_lib.py:237: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead. WARNING:tensorflow:From /workspace/models/research/object_detection/meta_architectures/ssd_meta_arch.py:597: The name tf.variable_scope is deprecated. Please use tf.compat.v1.variable_scope instead. W0211 12:14:05.318428 140575287248704 deprecation_wrapper.py:119] From /workspace/models/research/object_detection/meta_architectures/ssd_meta_arch.py:597: The name tf.variable_scope is deprecated. Please use tf.compat.v1.variable_scope instead. WARNING:tensorflow:From /workspace/models/research/object_detection/core/anchor_generator.py:171: The name tf.assert_equal is deprecated. Please use tf.compat.v1.assert_equal instead. W0211 12:14:16.637240 140575287248704 deprecation_wrapper.py:119] From /workspace/models/research/object_detection/core/anchor_generator.py:171: The name tf.assert_equal is deprecated. Please use tf.compat.v1.assert_equal instead. WARNING:tensorflow:From /workspace/models/research/object_detection/predictors/convolutional_box_predictor.py:150: The name tf.logging.info is deprecated. Please use tf.compat.v1.logging.info instead. W0211 12:14:16.660281 140575287248704 deprecation_wrapper.py:119] From /workspace/models/research/object_detection/predictors/convolutional_box_predictor.py:150: The name tf.logging.info is deprecated. Please use tf.compat.v1.logging.info instead. INFO:tensorflow:depth of additional conv before box predictor: 0 W0211 12:14:19.119874 140575287248704 deprecation_wrapper.py:119] From /workspace/models/research/object_detection/export_tflite_ssd_graph_lib.py:52: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead. 2020-02-11 12:14:19.121490: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcuda.so.1 W0211 12:14:19.729221 140575287248704 deprecation_wrapper.py:119] From /workspace/models/research/object_detection/export_tflite_ssd_graph_lib.py:267: The name tf.train.get_or_create_global_step is deprecated. Please use tf.compat.v1.train.get_or_create_global_step instead. WARNING:tensorflow:From /workspace/models/research/object_detection/export_tflite_ssd_graph_lib.py:292: The name tf.train.Saver is deprecated. Please use tf.compat.v1.train.Saver instead. W0211 12:14:19.734752 140575287248704 deprecation_wrapper.py:119] From /workspace/models/research/object_detection/export_tflite_ssd_graph_lib.py:292: The name tf.train.Saver is deprecated. Please use tf.compat.v1.train.Saver instead. WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow/python/tools/freeze_graph.py:127: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version. This gives me two files - tflite_graph.pb and tflite_graph.pbxt
Any help appreciated. |
@skulhare
|
@srjoglekar246 In your PR#8057, is the model |
I believe the model is floating-point, if I am not wrong. |
@srjoglekar246 When using the model you provided, I execute an evaluation of |
The tensorflow-v1.12.0 is okay. |
@still-wait Sorry this slipped through the cracks. Are you using the 2014 minival dataset to evaluate the images? That is probably the dataset that was used to evaluate the model, so if you used something different the values will change. |
System information
Describe the problem
I exported a freeze graph from the ssd_mobilenet_v3_large_coco checkpoint in the Tensorflow detection model zoo, but no objects were detected.
There is no problem with ssd_mobilenet_v3_small_coco in the same procedure.
The following model zoo checkpoints were used.
Perhaps the frozen_inference_graph.pb file in the Model Zoo was exported for TensorFlow Lite. For this reason, I exported the frozen_inference_graph.pb file using the procedure "Exporting a trained model for inference".
Perform inference using the exported rozen_inference_graph.pb file. However, ssd_mobilenet_v3_large_coco does not detect objects. ssd_mobilenet_v3_small_coco runs well and detects objects. Also, retraining ssd_mobilenet_v3_large is detect the object.
Also, I created a TFLite Model according to MediaPipe's TensorFlow / TFLite Object Detection Model and tried Android Object Detection (CPU) demo, but ssd_mobilenet_v3_large_coco does not detect objects. For ssd_mobilenet_v3_small_coco is detect the object.
Source code / logs
I created a notebook to run on Google Colab.
https://gist.github.com/NobuoTsukamoto/ac670e1103d58ef77d5f5db284bf43b7
The original code is used from the Object Detection API Demo notebook which is not up to date.
The text was updated successfully, but these errors were encountered: