Hi,
I followed the steps in https://developer.qualcomm.com/docs/snpe/convert_mobilenetssd.html to test the SNPE interface, but I failed.
I am working on a docker enviroment ubuntu 16.04.
Python 3.5.2
Tensorflow 1.15
snpe-1.37.0.788
snpe-tensorflow-to-dlc --input_network ~/download_models/exported/frozen_inference_graph.pb --input_dim Preprocessor/sub 1,300,300,3 --out_node detection_boxes --out_node detection_classes --out_node detection_scores --out_node num_detections -o /tmp/tflite/mobilenet_ssd.dlc --allow_unconsumed_nodes
log info:
WARNING:tensorflow:From /root/snpe-sdk/snpe-1.37.0.788/bin/x86_64-linux-clang/snpe-tensorflow-to-dlc:33: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.
2020-05-06 06:06:09,501 - 139 - WARNING - From /root/snpe-sdk/snpe-1.37.0.788/bin/x86_64-linux-clang/snpe-tensorflow-to-dlc:33: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.
WARNING:tensorflow:From /root/snpe-sdk/snpe-1.37.0.788/bin/x86_64-linux-clang/snpe-tensorflow-to-dlc:33: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.
2020-05-06 06:06:09,501 - 139 - WARNING - From /root/snpe-sdk/snpe-1.37.0.788/bin/x86_64-linux-clang/snpe-tensorflow-to-dlc:33: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.
2020-05-06 06:06:09.502005: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2020-05-06 06:06:09.524586: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 3600000000 Hz
2020-05-06 06:06:09.524965: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x4eb1a30 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-05-06 06:06:09.524989: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version
2020-05-06 06:06:09.526157: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /root/snpe-sdk/snpe-1.37.0.788/lib/x86_64-linux-clang:/root/snpe-sdk/snpe-1.37.0.788/lib/x86_64-linux-clang:/root/snpe-sdk/snpe-1.37.0.788/lib/x86_64-linux-clang:/root/snpe-sdk/snpe-1.37.0.788/lib/x86_64-linux-clang:
2020-05-06 06:06:09.526175: E tensorflow/stream_executor/cuda/cuda_driver.cc:318] failed call to cuInit: UNKNOWN ERROR (303)
2020-05-06 06:06:09.526195: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:169] retrieving CUDA diagnostic information for host: a1db66e8fb91
2020-05-06 06:06:09.526204: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:176] hostname: a1db66e8fb91
2020-05-06 06:06:09.526226: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:200] libcuda reported version is: Not found: was unable to find libcuda.so DSO loaded into this program
2020-05-06 06:06:09.526257: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:204] kernel reported version is: 430.64.0
WARNING:tensorflow:From /root/snpe-sdk/snpe-1.37.0.788/lib/python/snpe/converters/tensorflow/loader.py:147: The name tf.GraphDef is deprecated. Please use tf.compat.v1.GraphDef instead.
2020-05-06 06:06:09,526 - 139 - WARNING - From /root/snpe-sdk/snpe-1.37.0.788/lib/python/snpe/converters/tensorflow/loader.py:147: The name tf.GraphDef is deprecated. Please use tf.compat.v1.GraphDef instead.
2020-05-06 06:06:12.555948: W tensorflow/core/framework/op_kernel.cc:1651] OP_REQUIRES failed at function_ops.cc:69 : Internal: Retval[7872] has already been set.
2020-05-06 06:06:12.555948: W tensorflow/core/framework/op_kernel.cc:1651] OP_REQUIRES failed at function_ops.cc:69 : Internal: Retval[7874] has already been set.
2020-05-06 06:06:12.556052: W tensorflow/core/framework/op_kernel.cc:1651] OP_REQUIRES failed at function_ops.cc:69 : Internal: Retval[7893] has already been set.
2020-05-06 06:06:12.555948: W tensorflow/core/framework/op_kernel.cc:1651] OP_REQUIRES failed at function_ops.cc:69 : Internal: Retval[7881] has already been set.
2020-05-06 06:06:12.555948: W tensorflow/core/framework/op_kernel.cc:1651] OP_REQUIRES failed at function_ops.cc:69 : Internal: Retval[7879] has already been set.
2020-05-06 06:06:12.556115: W tensorflow/core/framework/op_kernel.cc:1651] OP_REQUIRES failed at function_ops.cc:69 : Internal: Retval[7873] has already been set.
2020-05-06 06:06:12.556133: W tensorflow/core/framework/op_kernel.cc:1651] OP_REQUIRES failed at function_ops.cc:69 : Internal: Retval[7875] has already been set.
2020-05-06 06:06:12.556145: W tensorflow/core/framework/op_kernel.cc:1651] OP_REQUIRES failed at function_ops.cc:69 : Internal: Retval[7880] has already been set.
2020-05-06 06:06:12.556107: W tensorflow/core/framework/op_kernel.cc:1651] OP_REQUIRES failed at function_ops.cc:69 : Internal: Retval[7877] has already been set.
2020-05-06 06:06:12.556110: W tensorflow/core/framework/op_kernel.cc:1651] OP_REQUIRES failed at function_ops.cc:69 : Internal: Retval[7882] has already been set.
2020-05-06 06:06:12.556178: W tensorflow/core/framework/op_kernel.cc:1651] OP_REQUIRES failed at function_ops.cc:69 : Internal: Retval[7878] has already been set.
2020-05-06 06:06:12,658 - 411 - WARNING - ERROR_TF_FALLBACK_TO_ONDEMAND_EVALUATION: Unable to resolve operation output shapes in single pass. Using on-demand evaluation!
2020-05-06 06:06:12,663 - 169 - INFO - INFO_ALL_BUILDING_NETWORK:
==============================================================
Building Network
==============================================================
2020-05-06 06:22:48,545 - 169 - INFO - INFO_DLC_SAVE_LOCATION: Saving model at /tmp/tflite/mobilenet_ssd.dlc
2020-05-06 06:22:48,554 - 169 - INFO - INFO_CONVERSION_SUCCESS: Conversion completed successfully
Although it shows the success, but the dlc file is only 4kb in size.
-rw-r--r-- 1 root root 4668 May 6 06:22 mobilenet_ssd.dlc
And the dlc can not be used in my application, is it a proiblem arising from the conversion process due to the waining?
What should I do? thanks for any replies.
Feng
I think you can change tensorflow version from 1.15 to 1.14
cheers
Hi gexf2
I had same things.
you can make the label.txt file from labelmap.txt of mobilenet ssd model in tensorflow object detection
cheers
Thank you very much, Jonghoon.
Many thanks Jonghoon! I also faced such a problem and your advice helped me)