Tensorflow CloudML上输入数据的正确格式

Tensorflow CloudML上输入数据的正确格式,tensorflow,object-detection,Tensorflow,Object Detection,我正试图将作业发送到CloudML上的对象检测模型,以获得预测。我在上遵循指南,但在提交请求时出现错误: 运行时错误:预测失败:错误处理输入:应为uint8,改为“str”类型的“\xf6>\x00\x01\x04\xa4d\x94…”(更多字节).\x00\x10\x10\x04\x80\xd9“ 这是我的代码: img = base64.b64encode(open("file.jpg", "rb").read()).decode('utf-8') json = {"b64": img} r

我正试图将作业发送到CloudML上的对象检测模型,以获得预测。我在上遵循指南,但在提交请求时出现错误:

运行时错误:预测失败:错误处理输入:应为uint8,改为“str”类型的“\xf6>\x00\x01\x04\xa4d\x94…”(更多字节).\x00\x10\x10\x04\x80\xd9“

这是我的代码:

img = base64.b64encode(open("file.jpg", "rb").read()).decode('utf-8')
json = {"b64": img}
result = predict_json(project, model, json, "v1")

我的错误是,我在导出图形时忘记添加
——输入\u type encoded\u image\u string\u tensor

我也忽略了这个。非常感谢!