使用AI平台将图像分割模型部署到生产中:HTTP请求500错误

时间:2019-05-09 15:45:38

标签: google-cloud-platform artificial-intelligence production-environment google-cloud-ml

我正在尝试使用Google Cloud的AI平台将tensorflow图像分割模型部署到生产中。我以前曾经使用AI平台成功部署了自定义图像分类模型,但是当我尝试使用以下方法部署自定义细分模型时:

gcloud ai-platform predict --model=%MODEL_NAME% --json-instances="C:\Users\umara\Desktop\DLOCTseg\Normal Image.json" --verbosity debug

我遇到以下错误

ERROR: (gcloud.ai-platform.predict) HTTP request failed. Response: {
  "error": {
    "code": 500,
    "message": "Internal error encountered.",
    "status": "INTERNAL"
  }
}

在(ML engine serving seems to not be working as intended)周围进行了一些谷歌搜索,发现该错误可能是由于输出大小太大所致。我的输出大小是每个图像输入一个1 X 512 x 512 x 9的数组。

Saved-model-cli

saved_model_cli show --all --dir C:\Users\umara\Desktop\DLOCTseg\export\v1

给予:

MetaGraphDef with tag-set: 'serve' contains the following SignatureDefs:

signature_def['serving_default']:
  The given SavedModel SignatureDef contains the following input(s):
    inputs['bytes'] tensor_info:
        dtype: DT_STRING
        shape: (-1)
        name: image_binary:0
  The given SavedModel SignatureDef contains the following output(s):
    outputs['conv2d_24'] tensor_info:
        dtype: DT_FLOAT
        shape: (-1, 512, 512, 9)
        name: conv2d_24/Sigmoid:0
  Method name is: tensorflow/serving/predict

如何使用AI平台在Google云上部署这样的模型?是否有使用Docker / Kubernetes手动部署大型输出图像分割模型的方法(是否有相关教程)?任何有关在Google Cloud上的服务器上部署此自定义模型以及远程访问预测的帮助都将受到赞赏。谢谢

0 个答案:

没有答案