【发布时间】:2017-12-06 09:51:56
【问题描述】:
我正在尝试将作业发送到我在 CloudML 上的对象检测模型以获取预测。我正在遵循https://cloud.google.com/ml-engine/docs/online-predict 的指南,但在提交请求时出现错误:
RuntimeError: Prediction failed: Error processing input: Expected uint8, got '\xf6>\x00\x01\x04\xa4d\x94...(更多字节)...\x00\x10\x10\x10\x04 'str' 类型的 \x80\xd9' 代替。
这是我的代码:
img = base64.b64encode(open("file.jpg", "rb").read()).decode('utf-8')
json = {"b64": img}
result = predict_json(project, model, json, "v1")
【问题讨论】:
标签: tensorflow object-detection