2
votes

With continuous evaluation of AI Platform, data_json_key error occurs.

Evaluation Job Inputs

  • Model objective: Image object detection (box)
  • IoU (Intersection over Union): 0.1
  • Data key: b64
  • Prediction label key: detection_classes
  • Prediction score key: detection_scores
  • Bounding box key: detection_boxes
  • Labeling Service: No
  • Daily sample percentage: 100%
  • Daily sample limit: 100

Error log

Partial Failures: [{"code":5,"message":"Can not find the image data under the data_json_key: image_bytes/b64"},{"code":5,"message":"Can not find the image data under the data_json_key: image_bytes/b64"},{"code":5,"message":"Can not find the image data under the data_json_key: image_bytes/b64"},{"message":"Found incorrect number of labeled dataset when preparing evaluation for dataset_id: 5ee3023a_0000_25e5_a9d2_94eb2c19321a"}]

I have data_json_key set to b64 and I think this is the correct predictive key for the model. However, the job returns an error as if it were expecting image_bytes/b64.

Supplement

The model is made by transfer learning ssd_mobilenetv2_oidv4*1 with TensorFlow Object Detection API according to this method*2.

1.https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/detection_model_zoo.md

2.https://cloud.google.com/blog/products/gcp/performing-prediction-with-tensorflow-object-detection-models-on-google-cloud-machine-learning-engine

1

1 Answers

0
votes

Your close. The Google documentation for Continuous Evaluation shows that data key is the key in the JSON example being submitted for prediction. In the AIP image classification example, the JSON is shown as:

{
  "instances": [
    {
      "image_bytes": {
        "b64": "iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAAhUlEQVR4AWOAgZeONnHvHcXiGJDBqyDTXa+dVC888oy51F9+eRdY8NdWwYz/RyT//znEsAjEt277+syt5VMJw989DM/+H2MI/L8tVBQk4d38xcWp7ctLhi97ZCZ0rXV6yLA4b6dH59sjTq3fnji1fp4AsWS5j7PXstRg+/b3gU7N351AQgA8+jkf43sjaQAAAABJRU5ErkJggg=="
      }
    }
  ]
}

The tutorial the continues:

Then provide the following keys:

Data key: image_bytes/b64
Prediction label key: sentiments
Prediction score key: confidence