A I M 4 0 3 with Apache MXNet

Thom Lane Thomas Delteil Applied Scientist Applied Scientist Amazon Web Services

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Agenda

• Workshop objective • Computer vision overview • Apache MXNet and GluonCV • Getting Started with GluonCV on Coursera • Amazon SageMaker • Ground Truth • Automatic Model Tuner • Neo • Deployment • AWS Event Engine © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Computer vision overview

Computer vision is an interdisciplinary scientific field that deals with how computers can make sense of images or videos.

It seeks to automate tasks performed by the human visual system. Common computer vision tasks

IMAGE OBJECT POSE CLASSIFICATION DETECTION ESTIMATION

SEMANTIC INSTANCE ACTION SEGMENTATION SEGMENTATION RECOGNITION Other computer vision tasks

OBJECT SUPER VISUAL ANOMALY IMAGE TRACKING RESOLUTION DETECTION RESTORATION

IMAGE SCENE OPTICAL CHARACTER IMAGE GENERATION RECONSTRUCTION RECOGNITION CAPTIONING © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Apache MXNet

SCALABLE DEBUGGABLE FLEXIBLE

OPTIMIZED 8 F O N T E N D LIBRARIES LANGUAGES PORTABLE

Apache MXNet at Amazon scale

Amazon’s deep learning framework of choice since 2016

• Amazon Alexa • Amazon Go • Amazon Retail Warehouse • Amazon Music • Amazon Rekognition • Amazon Comprehend Apache MXNet’s performance

Fujitsu used MXNet to break ImageNet record in 74.6 seconds using 2,048 NVIDIA Tesla V100 GPUs NVIDIA captures fastest framework on MLPerf with MXNet, the world’s first industry-wide AI benchmark Apache MXNet stack

Gluon Gluon Gluon CV NLP TS TOOLKITS

Gluon HIGH - L E V E L A P I S

P Y T H O N A P I S

NDArray … Symbol C O R E A P I S MXNET

MXNet Engine C++ BACKEND GluonCV

• Reproduction of important papers in recent years • Model zoo with 80+ pre-trained models • Training scripts to reproduce • Full training script + dataset download script • Logs of training run • Considerate APIs • Avoid rewriting the same utilities again and again • Pre-set data augmentation and transforms, visualization, and training utilities • Community support • User forum • GitHub community and open roadmap COCO (Common Objects in COntext)

2017

123,000 images 886,000 objects COCO (Common Objects in COntext)

80 classes Object detection model architectures

Faster-RCNN (with ResNet) SSD (with VGG or ResNet or MobileNet) YOLO (with DarkNet or MobileNet)

Choosing a model Mean Average PrecisionAverage Mean

Throughput (Samples per Second) MXNet and GluonCV installation

BASIC CPU OPTIMIZED GPU OPTIMIZED

pip install mxnet pip install mxnet-mkl pip install mxnet-cu101 MXNET

STABLE NIGHTLY

pip install gluoncv pip install gluoncv --pre GLUONCV © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS Computer Vision: Getting Started with GluonCV Learn ML with AWS Training and Certification

Role-based ML learning paths for developers, data scientists, data platform engineers, and business decision makers

70+ free digital ML courses from AWS experts let you learn from real-world challenges tackled at AWS

Validate expertise with the AWS Certified - Specialty exam

Visit https://aws.training/machinelearning © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon SageMaker overview

LABEL BUILD & TRAIN TUNE COMPILE DEPLOY Ground Truth Notebooks & Jobs Model Tuner Neo Endpoints © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon SageMaker Ground Truth Amazon SageMaker Ground Truth Amazon SageMaker Ground Truth Amazon SageMaker Ground Truth Amazon SageMaker Ground Truth Amazon SageMaker Automatic Model Tuner

HYPERPARAMETERS

MODEL Number of layers 1, 2, 3, … MODEL Activation function Sigmoid, tanh, RELU, … OPTIMIZATION Method SGD, Adam, AdaGrad, … OPTIMIZATION 0.01 to 2 DATA Batch Size 8, 16, 32 … DATA Augmentation Resize, Normalize, Color Jitter, …

© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. 33

Amazon SageMaker Automatic Model Tuner Accuracy

Learning Rate

© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. 34 Amazon SageMaker Neo

OPTIMIZE MODEL

FOR SPECIFIC TARGET Qualcomm Model deployment

Amazon SageMaker Amazon AWS IoT Amazon SageMaker Endpoints Elastic Inference Greengrass Batch Transform © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS Event Engine https://dashboard.eventengine.run

The AWS Event Engine was created to help AWS field teams run Workshops, GameDays, Bootcamps, Immersion Days, and other events that require hands-on access to AWS accounts. https://dashboard.eventengine.run https://dashboard.eventengine.run https://dashboard.eventengine.run/dashboard https://dashboard.eventengine.run/dashboard https://dashboard.eventengine.run/dashboard Thank you!

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.