简体   繁体   English

无法使用 tflite object 检测 model 推断结果

[英]Unable to infer results using tflite object detection model

I successfully converted a ssd_mobilenet_v3 model into a.tflite by retraining the model.我通过重新训练 model 成功地将 ssd_mobilenet_v3 model 转换为 a.tflite。 (previously trained on coco dataset) (之前在 coco 数据集上训练过)

But while using this model for object detection to run inference on a single image using the following code:但是,在使用此 model 进行 object 检测以使用以下代码对单个图像运行推理时:

interpreter = tf.lite.Interpreter(model_path)

I am getting the following error:我收到以下错误:

ValueError                                Traceback (most recent call last)
<ipython-input-15-e1c9008b610c> in <module>
----> 1 interpreter = tf.lite.Interpreter("/home/sushanth/Documents      /nuts_poc/tflite_od/nam_model_quantized.lite")
  2 interpreter.allocate_tensors()
  3 input_details = interpreter.get_input_details()
  4 output_details = interpreter.get_output_details()
  5 input_tensor_index = interpreter.get_input_details()[0]["index"]

~/.local/lib/python3.7/site-packages/tensorflow/lite/python/interpreter.py   in __init__(self, model_path, model_content)
 75       self._interpreter = (
 76             _interpreter_wrapper.InterpreterWrapper_CreateWrapperCPPFromFile(
---> 77               model_path))
 78       if not self._interpreter:
 79         raise ValueError('Failed to open {}'.format(model_path))

ValueError: Op builtin_code out of range: 117. Are you using old TFLite binary with newer model?Registration failed.

Kindly explain the error and a possible solution.请解释错误和可能的解决方案。

Tensorflow Version: 1.1.4 Tensorflow 版本:1.1.4

OS: Ubuntu 18.04操作系统:Ubuntu 18.04

Python: 3.7 Python:3.7

PS: I converted a classifier model (inception_v2) into tflite and used the above code ("interpreter = tf.lite.Interpreter(model_path)") without any error! PS:我将分类器model(inception_v2)转换为tflite并使用上面的代码(“interpreter = tf.lite.Interpreter(model_path)”)没有任何错误!

Update tensorflow version to >=2.0.0将 tensorflow 版本更新为 >=2.0.0

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用用于 object 检测的元数据创建 tflite model - create tflite model with metadata for object detection 创建填充有元数据的 Tflite 模型时出现问题(用于对象检测) - Issue in creating Tflite model populated with metadata (for object detection) 如何将对象检测模型(在其冻结图形中)转换为.tflite,而不需要任何输入和输出数组的知识 - How to convert an object detection model, in it's frozen graph, to a .tflite, without any knowledge of input and output arrays 将 SSD object 检测 model 转换为 TFLite 并将其从 float 量化为 uint8 用于 EdgeTPU - Converting SSD object detection model to TFLite and quantize it from float to uint8 for EdgeTPU TFLite model maker 自定义 object 检测器训练使用 tfrecord - TFLite model maker custom object detector training using tfrecord 使用 model 推断批次与使用 pytorch 的个体时的不同结果 - differing results when using model to infer on a batch vs individual with pytorch Tensorflow对象检测-将.pb文件转换为tflite - Tensorflow Object Detection - Convert .pb file to tflite 使用 Tensorflow 对象检测 API 导出没有 NMS 和边界框解码逻辑的 TFlite ssd-mobilenet - Export TFlite ssd-mobilenet without NMS and with bounding boxes decoding logic using Tensorflow Object Detection API 无法在 Kotlin 中获得正确的 output 的 TFLite model - Unable to get proper output of TFLite model in Kotlin tflite object 检测中的 Raspberry Pi GPIO 引脚问题 - Raspberry Pi GPIO pin issue in tflite object detection
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM