Skip to content

classification image

KimJeongChul edited this page Apr 26, 2019 · 1 revision

Classification Image - CNN

Library : (boto3 / azure.functions, azure.storage.file / google.cloud.storage), time, uuid, cv2

  • aws : build your deployment package

aws-build-deployment-package -> pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.4.0-cp27-none-linux_x86_64.whl (limit to packaing deployment file size)

  • google : x

  • azure : x

Workload Input: Image

Workload Output: JSON

Lambda payload(test-event) example:

image file : animal-dog.jpg or https://www.pexels.com/royalty-free-images/ download

model_object_key : squeezenet_weights_tf_dim_ordering_tf_kernels.h5

{
    "input_bucket": [INPUT_BUCKET_NAME],
    "key": [IMAGE_FILE_NAME],
    "output_bucket": [OUTPUT_BUCKET_NAME],
    "model_bucket": [MODEL_BUCKET_NAME],
    "model_object_key": [MODEL_OBJECT_KEY]
}

or Storage service trigger example(AWS S3):

for record in event['Records']:
   bucket = record['s3']['bucket']['name']
   key = record['s3']['object']['key']

Lambda Output : latency