【发布时间】:2019-11-10 05:32:49
【问题描述】:
我有一个 SSD tflite 检测模型,我在台式计算机上使用 Python 运行该模型。就目前而言,我下面的脚本将单个图像作为推理的输入,并且工作正常:
# Load TFLite model and allocate tensors.
interpreter = tf.lite.Interpreter(model_path="model.tflite")
interpreter.allocate_tensors()
img_resized = Image.open(file_name)
input_data = np.expand_dims(img_resized, axis=0)
input_data = (np.float32(input_data) - input_mean) / input_std
input_details = interpreter.get_input_details()
output_details = interpreter.get_output_details()
interpreter.set_tensor(input_details[0]['index'], input_data)
interpreter.invoke()
output_data = interpreter.get_tensor(output_details[0]['index'])
如何在 .mp4 视频上运行推理作为输入?
是否也可以从该视频上检测到的对象绘制边界框?
【问题讨论】:
标签: python tensorflow-lite inference