我尝试使用高通SNPE在我的骁龙820上集成优化SSD模型计算。Il 成功地将 SSD Tensorflow 模型转换为 DLC 文件。
没有集成SSD模型的示例,我尝试不同的解决方案,但不成功。
是否有人在snpe运行网络可执行文件上找到示例或有解决方案?
编辑:
首先,当我生成 dlc 模型(来自 tensorflow 模型 github(时,我得到了该输出(这似乎不正确(:
./snpe-tensorflow-to-dlc --graph /home/xavier/Downloads/frozen_inference_graph.pb -i Preprocessor/sub 300,300,3 --out_node detection_classes --out_node detection_boxes --out_node detection_scores --dlc mobilenet_ssd.dlc --allow_unconsumed_nodes
2018-03-11 22:34:33.243539: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2018-03-11 22:34:34.505804: W tensorflow/core/framework/op_kernel.cc:1202] OP_REQUIRES failed at function_ops.cc:80 : Internal: Retval[1890] has already been set.
2018-03-11 22:34:34.505849: W tensorflow/core/framework/op_kernel.cc:1202] OP_REQUIRES failed at function_ops.cc:80 : Internal: Retval[1847] has already been set.
2018-03-11 22:34:34.505869: W tensorflow/core/framework/op_kernel.cc:1202] OP_REQUIRES failed at function_ops.cc:80 : Internal: Retval[2137] has already been set.
2018-03-11 22:34:34.505884: W tensorflow/core/framework/op_kernel.cc:1202] OP_REQUIRES failed at function_ops.cc:80 : Internal: Retval[2140] has already been set.
2018-03-11 22:34:34.505924: W tensorflow/core/framework/op_kernel.cc:1202] OP_REQUIRES failed at function_ops.cc:80 : Internal: Retval[2143] has already been set.
2018-03-11 22:34:34.505935: W tensorflow/core/framework/op_kernel.cc:1202] OP_REQUIRES failed at function_ops.cc:80 : Internal: Retval[2141] has already been set.
2018-03-11 22:34:34.505950: W tensorflow/core/framework/op_kernel.cc:1202] OP_REQUIRES failed at function_ops.cc:80 : Internal: Retval[2144] has already been set.
2018-03-11 22:34:34.505964: W tensorflow/core/framework/op_kernel.cc:1202] OP_REQUIRES failed at function_ops.cc:80 : Internal: Retval[2146] has already been set.
2018-03-11 22:34:34.505977: W tensorflow/core/framework/op_kernel.cc:1202] OP_REQUIRES failed at function_ops.cc:80 : Internal: Retval[2148] has already been set.
2018-03-11 22:34:34.505991: W tensorflow/core/framework/op_kernel.cc:1202] OP_REQUIRES failed at function_ops.cc:80 : Internal: Retval[2150] has already been set.
2018-03-11 22:34:34.506004: W tensorflow/core/framework/op_kernel.cc:1202] OP_REQUIRES failed at function_ops.cc:80 : Internal: Retval[2138] has already been set.
2018-03-11 22:34:34.506020: W tensorflow/core/framework/op_kernel.cc:1202] OP_REQUIRES failed at function_ops.cc:80 : Internal: Retval[1851] has already been set.
2018-03-11 22:34:34.506027: W tensorflow/core/framework/op_kernel.cc:1202] OP_REQUIRES failed at function_ops.cc:80 : Internal: Retval[1848] has already been set.
2018-03-11 22:34:34.506036: W tensorflow/core/framework/op_kernel.cc:1202] OP_REQUIRES failed at function_ops.cc:80 : Internal: Retval[1850] has already been set.
2018-03-11 22:34:34.506055: W tensorflow/core/framework/op_kernel.cc:1202] OP_REQUIRES failed at function_ops.cc:80 : Internal: Retval[1849] has already been set.
2018-03-11 22:34:34.506483: W tensorflow/core/framework/op_kernel.cc:1202] OP_REQUIRES failed at function_ops.cc:80 : Internal: Retval[1857] has already been set.
2018-03-11 22:34:34.506535: W tensorflow/core/framework/op_kernel.cc:1202] OP_REQUIRES failed at function_ops.cc:80 : Internal: Retval[1855] has already been set.
2018-03-11 22:34:34.506539: W tensorflow/core/framework/op_kernel.cc:1202] OP_REQUIRES failed at function_ops.cc:80 : Internal: Retval[1853] has already been set.
2018-03-11 22:34:34.506561: W tensorflow/core/framework/op_kernel.cc:1202] OP_REQUIRES failed at function_ops.cc:80 : Internal: Retval[1854] has already been set.
2018-03-11 22:34:34.506547: W tensorflow/core/framework/op_kernel.cc:1202] OP_REQUIRES failed at function_ops.cc:80 : Internal: Retval[1856] has already been set.
2018-03-11 22:34:34.506574: W tensorflow/core/framework/op_kernel.cc:1202] OP_REQUIRES failed at function_ops.cc:80 : Internal: Retval[1852] has already been set.
2018-03-11 22:34:34,512 - 391 - WARNING - ERROR_TF_FALLBACK_TO_ONDEMAND_EVALUATION: Unable to resolve operation output shapes in single pass. Using on-demand evaluation!
然后我为 snpe-net-run 生成输出:
./snpe-net-run --container ./mobilenet_ssd.dlc --input_list ../../models/inception_v3/data/cropped/raw_list.txt
对于每个图像,它会生成 detection_classes:0.raw 的文件。
该文件不为空,但似乎所有图像都相同。
这是我得到的示例文件:
http://www.filedropper.com/detectionclasses0
您可以在SDK/docs/html/tutorial_alexnet.html
中找到 snpe-net-run 用法