Upgrade to PRO for Only $50/Yearโ€”Limited-Time Offer! ๐Ÿ”ฅ

Learn ML by building Computer Vision Applicatio...

Learn ML by building Computer Vision Application with Amazon Rekognition andย SageMaker

Agenda
- Build Image Analysis System with Amazon Rekognition
- Machine Learning Basic Concepts
- Build a Visual Search Application with Amazon SageMaker
- Amazon SageMaker Studio Notebooks
- Amazon SageMaker Training Job
- Amazon SageMaker Endpoints

Avatar for Sungmin Kim

Sungmin Kim

May 04, 2022
Tweet

More Decks by Sungmin Kim

Other Decks in Programming

Transcript

  1. ยฉ 2021, Amazon Web Services, Inc. or its Affiliates. Sungmin

    Kim Solutions Architect, AWS Computer Vision Applications์„ ๋งŒ๋“ค๋ฉด์„œ ๋ฐฐ์šฐ๋Š” Machine Learning powered by Amazon Rekognition and SageMaker
  2. Agenda โ€ข Amazon Rekognition โ€ข Machine Learning Basic Concepts โ€ข

    Amazon SageMaker โ€ข Amazon SageMaker Studio Notebooks โ€ข Amazon SageMaker Training Job โ€ข Amazon SageMaker Endpoints
  3. How to Choose the Most Relevant Advertisement? โ€ข may be

    easy to find, if a image has correct tags. โ€ข If so, how to tag millions of images in fast, cost-efficient way? โ€ข Machine Learning may save your life
  4. Amazon SageMaker Label data Aggregate & prepare data Store &

    share features Auto ML Spark/R Detect bias Visualize in notebooks Pick algorithm Train models Tune parameters Debug & profile Deploy in production Manage & monitor CI/CD Human review Ground Truth Data Wrangler Feature store Autopilot Processing Clarify Studio Notebooks Built-in or Bring-your-own Experiments Spot Training Distributed Training Automatic Model Tuning Debugger Model Hosting Multi-model Endpoints Model Monitor Pipelines Augmented AI AMAZON SAGEMAKER EDGE MANAGER SAGEMAKER STUDIO IDE AMAZON SAGEMAKER JUMPSTART VISION SPEECH TEXT SEARCH CHATBOTS PERSONALIZATION FORECASTING FRAUD CONTACT CENTERS Deep Learning AMIs & Containers GPUs & CPUs Elastic Inference Trainium Inferentia FPGA AI SERVICES ML SERVICES FRAMEWORKS & INFRASTRUCTURE DeepGraphLibrary Amazon Rekognition Amazon Polly Amazon Transcribe +Medical Amazon Lex Amazon Personalize Amazon Forecast Amazon Comprehend +Medical Amazon Textract Amazon Kendra Amazon CodeGuru Amazon Fraud Detector Amazon Translate INDUSTRIAL AI CODE AND DEVOPS Amazon DevOps Guru Voice ID For Amazon Connect Contact Lens Amazon Monitron AWS Panorama + Appliance Amazon Lookout for Vision Amazon Lookout for Equipment Amazon HealthLake HEALTHCARE AI Amazon Lookout for Metrics ANOMOLY DETECTION Amazon Transcribe for Medical Amazon Comprehend for Medical ๋ชจ๋“  ๊ฐœ๋ฐœ์ž๋ฅผ ์œ„ํ•œ ๋‹ค์–‘ํ•œ ์ธ๊ณต ์ง€๋Šฅ ๋„๊ตฌ ์ œ๊ณต
  5. Amazon SageMaker Label data Aggregate & prepare data Store &

    share features Auto ML Spark/R Detect bias Visualize in notebooks Pick algorithm Train models Tune parameters Debug & profile Deploy in production Manage & monitor CI/CD Human review Ground Truth Data Wrangler Feature store Autopilot Processing Clarify Studio Notebooks Built-in or Bring-your-own Experiments Spot Training Distributed Training Automatic Model Tuning Debugger Model Hosting Multi-model Endpoints Model Monitor Pipelines Augmented AI AMAZON SAGEMAKER EDGE MANAGER SAGEMAKER STUDIO IDE AMAZON SAGEMAKER JUMPSTART VISION SPEECH TEXT SEARCH CHATBOTS PERSONALIZATION FORECASTING FRAUD CONTACT CENTERS Deep Learning AMIs & Containers GPUs & CPUs Elastic Inference Trainium Inferentia FPGA AI SERVICES ML SERVICES FRAMEWORKS & INFRASTRUCTURE DeepGraphLibrary Amazon Rekognition Amazon Polly Amazon Transcribe +Medical Amazon Lex Amazon Personalize Amazon Forecast Amazon Comprehend +Medical Amazon Textract Amazon Kendra Amazon CodeGuru Amazon Fraud Detector Amazon Translate INDUSTRIAL AI CODE AND DEVOPS Amazon DevOps Guru Voice ID For Amazon Connect Contact Lens Amazon Monitron AWS Panorama + Appliance Amazon Lookout for Vision Amazon Lookout for Equipment Amazon HealthLake HEALTHCARE AI Amazon Lookout for Metrics ANOMOLY DETECTION Amazon Transcribe for Medical Amazon Comprehend for Medical ๋ชจ๋“  ๊ฐœ๋ฐœ์ž๋ฅผ ์œ„ํ•œ ๋‹ค์–‘ํ•œ ์ธ๊ณต ์ง€๋Šฅ ๋„๊ตฌ ์ œ๊ณต
  6. Amazon Rekognition Image and Video CELEBRITY RECOGNITION FACE COMPARE &

    SEARCH PATHING FACE DETECTION AND ANALYSIS LIVE STREAM VIDEO TEXT CONTENT MODERATION CUSTOM LABELS OBJECT, SCENE, AND ACTIVITY VIDEO SEGMENTS PPE DETECTION
  7. Architecture: Automatic Image Tagging Amazon OpenSearch Service Amazon Kinesis Data

    Streams Amazon Rekognition Images AWS Lambda Amazon S3 bucket with images Amazon API Gateway https://github.com/aws-samples/aws-realtime-image-analysis Automatic Image Recognition
  8. AI Services ํ•œ ๋ฒˆ์— ์ •๋ฆฌํ•˜๊ธฐ โ€ข Human-like โ€ข ๋ณด๊ธฐ(Vision) โ€“

    Rekognition โ€ข ๋“ฃ๊ธฐ ๋ฐ ๋งํ•˜๊ธฐ(Speech) o Polly(Text-To-Speech) o Transcribe(Speech-To-Text) o Transcribe Medical โ€ข ์ฝ๊ธฐ(Text) o Comprehend o Comprehend Medical o Textract โ€ข Common Applications โ€ข ์˜ˆ์ธก โ€“ Forecast โ€ข ์ถ”์ฒœ - Personalize โ€ข ๊ฒ€์ƒ‰ โ€“ Kendra โ€ข ์ฑ„ํŒ… โ€“ Lex โ€ข ๊ณ ๊ฐ ์„ผํ„ฐ โ€“ Contact Lens โ€ข ์‚ฌ๊ธฐ ํƒ์ง€ โ€“ Fraud Detector โ€ข ๊ฐœ๋ฐœ์ž ๋„๊ตฌ โ€“ Code Guru
  9. ยฉ 2020, Amazon Web Services, Inc. or its Affiliates. Option

    1- Build A Rule Engine Age Gender Purchase Date Items 30 M 3/1/2017 Toy 40 M 1/3/2017 Books โ€ฆ. โ€ฆโ€ฆ โ€ฆ.. โ€ฆ.. Input Output Age Gender Purchase Date Items 30 M 3/1/2017 Toy โ€ฆ. โ€ฆโ€ฆ โ€ฆ.. โ€ฆ.. Rule 1: 15 <age< 30 Rule 2: Bought Toy=Y, Last Purchase<30 days Rule 3: Gender = โ€˜Mโ€™, Bought Toy =โ€˜Yโ€™ Rule 4: โ€ฆโ€ฆ.. Rule 5: โ€ฆโ€ฆ.. Human Programmer
  10. ยฉ 2020, Amazon Web Services, Inc. or its Affiliates. Model

    Output Historical Purchase Data (Training Data) Prediction Age Gender Items 35 F 39 M Toy Input - New Unseen Data Age Gender Purchase Date Items 30 M 3/1/2017 Toy 40 M 1/3/2017 Books โ€ฆ. โ€ฆโ€ฆ โ€ฆ.. โ€ฆ.. Learning Algorithm Option 2 - Learn The Business Rules From Data
  11. ยฉ 2020, Amazon Web Services, Inc. or its Affiliates. We

    Call This Approach Machine Learning Model Output Historical Purchase Data (Training Data) Prediction Age Gender Items 35 F 39 M Toy Input - New Unseen Data Age Gender Purchase Date Items 30 M 3/1/2017 Toy 40 M 1/3/2017 Books โ€ฆ. โ€ฆโ€ฆ โ€ฆ.. โ€ฆ.. Rule 1: 15 <age< 30 Rule 2: Bought Toy=Y, Last Purchase<30 days Rule 3: Gender = โ€˜Mโ€™, Bought Toy =โ€˜Yโ€™ Rule 4: โ€ฆโ€ฆ.. Rule 5: โ€ฆโ€ฆ.. Human Programmer Learning Algorithm
  12. ยฉ 2020, Amazon Web Services, Inc. or its Affiliates. What

    is Learning Algorithm? Input X (size of house) Output Y (price) f(x) = W*x + b xo xn 2 3 1
  13. ยฉ 2020, Amazon Web Services, Inc. or its Affiliates. Machine

    Learning Algorithm f(x) = W*x + b โ€ข W = ? โ€ข b = ? ๋ชจ๋ธ ํ•™์Šต ๋Œ€์ƒ Size (X) 2104 1600 2400 1416 3000 1985 1534 1427 1380 1494 Price (y) 400 330 369 232 540 300 315 199 212 243 โœ— โœ— โœ— โœ— โœ— โœ— โœ— โœ— Input X (size of house) Output Y (Price) 2 3 1 (1), (2), (3) ์ค‘ ๊ฐ€์žฅ ์ ํ•ฉํ•œ(fit) ๊ฒƒ์€? Dataset
  14. ยฉ 2020, Amazon Web Services, Inc. or its Affiliates. Machine

    Learning Algorithm f(x) = W*x + b โ€ข W = ? โ€ข b = ? ๋ชจ๋ธ ํ•™์Šต ๋Œ€์ƒ Size (X) 2104 1600 2400 1416 3000 1985 1534 1427 1380 1494 Price (y) 400 330 369 232 540 300 315 199 212 243 (1), (2), (3) ์ค‘ ๊ฐ€์žฅ ์ ํ•ฉํ•œ(fit) ๊ฒƒ์€? Dataset โ€ข ์ž…๋ ฅ ๋ฐ์ดํ„ฐ๋Š” ๋ชจ๋‘ ์ˆซ์ž์ด๋‹ค. โ€ข ML์˜ ๋ชจ๋ธ์€ ์ˆ˜ํ•™์  ๋ชจํ˜•(์ˆ˜์‹) ์ด๋‹ค. โ€ข ML์˜ ๊ฒฐ๊ณผ๋ฌผ์€ ์ˆ˜์‹์˜ ๋งค๊ฐœ๋ณ€์ˆ˜ ์ด๋‹ค.
  15. ยฉ 2020, Amazon Web Services, Inc. or its Affiliates. ๋ชจ๋ธ

    ํ‰๊ฐ€ Data Model ML Algorithm ์ˆซ์ž 0, 1, 2,.. 0.01, 0.02,.. 001, 010, 011, .. model {w1 , w2 , โ€ฆ, wn , b} f(x) = w1 *x1 + w2 *x2 + โ€ฆ + wn *xn + b = W*x + b ML ์•Œ๊ณ ๋ฆฌ์ฆ˜์€ Numeric data๋กœ f(x)๋ผ๋Š” ์‹(๋ชจ๋ธ)์˜ ๋งค๊ฐœ๋ณ€์ˆ˜(w1 , w2 , โ€ฆ, b)๋ฅผ ์ถ”์ • ํ•˜๋Š” ๋ฐฉ๋ฒ• โœ— โœ— โœ— โœ— โœ— โœ— โœ— โœ— Input X (size of house) Output Y (Price) 2 3 1 Q) (1), (2), (3) ์ค‘ ๊ฐ€์žฅ ์ ํ•ฉํ•œ(fit) ๊ฒƒ์€?
  16. ยฉ 2020, Amazon Web Services, Inc. or its Affiliates. Input

    X (size of house) Loss Function (Objective Function) Output Y (Price) f(x) = W*x + b Error (f(Xj ) โ€“ Yj ) Loss(W, b) = โˆ‘(f(xj ) โ€“ yj )2 1 n j=1 n xo xn Mean Square Error(MSE) Function Guessing Value Actual Value
  17. ยฉ 2020, Amazon Web Services, Inc. or its Affiliates. Loss

    Function (Objective Function) ์„ ํ˜• ํšŒ๊ท€ ๋ฌธ์ œ ์„ ํ˜• ํšŒ๊ท€๋ฅผ ์œ„ํ•œ ๋ชฉ์  ํ•จ์ˆ˜ โ€ข ๐‘“! (๐ฑ" )๋Š” ์˜ˆ์ธกํ•จ์ˆ˜์˜ ์ถœ๋ ฅ, yi ๋Š” ์˜ˆ์ธกํ•จ์ˆ˜๊ฐ€ ๋งž์ถ”์–ด์•ผ ํ•˜๋Š” ๋ชฉํ‘œ ๊ฐ’ โ€ข ๐‘“! (๐ฑ" ) - yi ๋Š” ์˜ค์ฐจ = ํ‰๊ท ์ œ๊ณฑ์˜ค์ฐจMSE(mean squared error)
  18. ยฉ 2020, Amazon Web Services, Inc. or its Affiliates. Loss

    Function (Objective Function) ์„ ํ˜• ํšŒ๊ท€ ๋ฌธ์ œ ์„ ํ˜• ํšŒ๊ท€๋ฅผ ์œ„ํ•œ ๋ชฉ์  ํ•จ์ˆ˜ โ€ข ๐‘“! (๐ฑ" )๋Š” ์˜ˆ์ธกํ•จ์ˆ˜์˜ ์ถœ๋ ฅ, yi ๋Š” ์˜ˆ์ธกํ•จ์ˆ˜๊ฐ€ ๋งž์ถ”์–ด์•ผ ํ•˜๋Š” ๋ชฉํ‘œ ๊ฐ’ โ€ข ๐‘“! (๐ฑ" ) - yi ๋Š” ์˜ค์ฐจ = ํ‰๊ท ์ œ๊ณฑ์˜ค์ฐจMSE(mean squared error) ์ฒ˜์Œ์—๋Š” ์ตœ์  ๋งค๊ฐœ๋ณ€์ˆ˜ ๊ฐ’์„ ์•Œ ์ˆ˜ ์—†์œผ๋ฏ€๋กœ ์ž„์˜ ๊ฐ’์œผ๋กœ ฮ˜! = ๐‘ค! , ๐‘! ์„ค์ • ร  ฮ˜" = ๐‘ค" , ๐‘" ๋กœ ๊ฐœ์„  ร  ฮ˜# = ๐‘ค#, ๐‘# ๋กœ ๊ฐœ์„  ร  ฮ˜# ๋Š” ์ตœ์ ํ•ด & ฮ˜ โ€ข ์ด๋•Œ ๐ฝ ฮ˜# > ๐ฝ ฮ˜$ > ๐ฝ ฮ˜%
  19. ยฉ 2020, Amazon Web Services, Inc. or its Affiliates. Plotting

    Loss Function (Single Variable) W Loss (W) Minimum loss
  20. ยฉ 2020, Amazon Web Services, Inc. or its Affiliates. Optimization

    - Minimize Loss Function W Minimum loss ํ˜„ ์ง€์ ์˜ ๊ธฐ์šธ๊ธฐ (Partial Derivative) Loss๋ฅผ ๋‚ฎ์ถ”๋Š” ๋ฐฉํ–ฅ(Descent) WJ WJ+1 Gradient Descent Wj+1 = Wj ๐›ผ Loss(Wj) โˆ‚ โˆ‚Wj Random initial value Loss (W) ๐›ผ ํ•œ ๋ฐœ์ž๊ตญ ํฌ๊ธฐ (Learning Rate)
  21. ยฉ 2020, Amazon Web Services, Inc. or its Affiliates. Gradient

    Decent: ์ตœ์ ํ™” ๋ฌธ์ œ ํ•ด๊ฒฐ๋ฒ• Learning Step weight์˜ ์—…๋ฐ์ดํŠธ = ์—๋Ÿฌ ๋‚ฎ์ถ”๋Š” ๋ฐฉํ–ฅ x ํ•œ ๋ฐœ์ž๊ตญ ํฌ๊ธฐ x ํ˜„ ์ง€์ ์˜ ๊ธฐ์šธ๊ธฐ (decent) (learning rate) (gradient) Loss function์˜ ํ˜„์žฌ ๊ฐ€์ค‘์น˜์—์„œ ๊ธฐ์šธ๊ธฐ(gradient)๋ฅผ ๊ตฌํ•ด์„œ Loss๋ฅผ ์ค„์ด๋Š” ๋ฐฉํ–ฅ์œผ๋กœ ๊ฐ€์ค‘์น˜๋ฅผ ์—…๋ฐ์ดํŠธํ•ด ๋‚˜๊ฐ„๋‹ค Learning Rate
  22. ยฉ 2020, Amazon Web Services, Inc. or its Affiliates. Hyper

    Parameter Learning Rate(ํ•™์Šต๋ฅ )๋Š” ์–ด๋–ป๊ฒŒ ์„ค์ • ํ•ด์•ผํ• ๊นŒ? Data Model ML Algorithm ์ˆซ์ž 0, 1, 2,.. 0.01, 0.02,.. 001, 010, 011, .. model {w1 , w2 , โ€ฆ, wn , b} f(x) = w1 *x1 + w2 *x2 + โ€ฆ + wn *xn + b = W*x + b Gradient Descent ์•Œ๊ณ  ์‹ถ์€ ๊ฐ’ (Parameter) ๋ชจ๋ธ ํ•™์Šต์„ ์œ„ํ•ด์„œ ๋ฏธ๋ฆฌ ์•Œ์•„์•ผ ํ•˜๋Š” ๊ฐ’ (Hyperparameter)
  23. ยฉ 2020, Amazon Web Services, Inc. or its Affiliates. small

    learning rate right learning rate large learning rate Hyper Parameter Tuning (HPO) (ํ•™์Šต์ด) ๋„ˆ๋ฌด ๋А๋ฆฌ๋‹ค ๋‹ต์„ ์ฐพ์ง€ ๋ชปํ•œ๋‹ค
  24. ยฉ 2020, Amazon Web Services, Inc. or its Affiliates. Weight

    ์ดˆ๊ธฐ๊ฐ’, Learning Rate ๋“ฑ์„ ์ ์ ˆํ•˜๊ฒŒ ์„ ํƒํ•ด์•ผํ•œ๋‹ค. Gradient Descent pitfalls Weight ์ดˆ๊ธฐ๊ฐ’1 Weight ์ดˆ๊ธฐ๊ฐ’2
  25. ยฉ 2020, Amazon Web Services, Inc. or its Affiliates. ์ตœ์ ํ™”๋ฅผ

    ์ด์šฉํ•œ ๊ธฐ๊ณ„ ํ•™์Šต์˜ ๋ฌธ์ œ ํ’€์ด ๊ณผ์ • f(x) = W*x + b House Price Prediction Guessing Value Actual Value Real-World Problem ์ตœ์ ํ™” Objective Function ML Model Gradient Descent
  26. ยฉ 2020, Amazon Web Services, Inc. or its Affiliates. ๋ชจ๋“ 

    ์ž…๋ ฅ ๋ฐ์ดํ„ฐ๋Š” ์ˆซ์ž(Number) Feature: ์ˆซ์ž๋กœ ๋ณ€ํ™˜๋œ ML ์•Œ๊ณ ๋ฆฌ์ฆ˜์˜ ์ž…๋ ฅ ๋ฐ์ดํ„ฐ
  27. ยฉ 2020, Amazon Web Services, Inc. or its Affiliates. ํ•™์Šต(Training)์˜

    ์ตœ์ข… ๋ชฉํ‘œ ํ•œ๋ฒˆ๋„ ๋ณธ์ ์ด ์—†๋Š” ๋ฌธ์ œ๋ฅผ ์ž˜ ํ‘ธ๋Š” ๊ฒƒ ํ•™์Šต ๋ชจ์˜ ํ‰๊ฐ€ ์ตœ์ข… ํ‰๊ฐ€
  28. ยฉ 2020, Amazon Web Services, Inc. or its Affiliates. ๋ฐ์ดํ„ฐ

    ๋‚˜๋ˆ„๊ธฐ ์ „์ฒด ๋ฐ์ดํ„ฐ Training Test Training Validation ํ•œ๋ฒˆ๋„ ๋ณธ์  ์—†๋Š” ๋ฌธ์ œ๋ฅผ ์ž˜ ํ’€ ์ˆ˜ ์žˆ๋„๋ก ํ›ˆ๋ จ ์‹œํ‚ค๊ธฐ ์œ„ํ•ด์„œ ๋ฐ์ดํ„ฐ๋ฅผ ๋‚˜๋ˆˆ๋‹ค โ€œํ›ˆ๋ จ์€ ์‹ค์ „์ฒ˜๋Ÿผ, ์‹ค์ „์€ ํ›ˆ๋ จ์ฒ˜๋Ÿผโ€
  29. ยฉ 2020, Amazon Web Services, Inc. or its Affiliates. Wrap-up:

    Machine Learning โ€ข Machine Learning โ–ช ํ˜„์‹ค ๋ฌธ์ œ โ†’ ์ˆ˜ํ•™ ๋ชจํ˜•(๋ชจ๋ธ) โ†’ ๋ชจ์ˆ˜ (Parameter, ๊ฐ€์ค‘์น˜) ์ถ”์ • โ€ข Feature Engineering: ์ž…๋ ฅ ๋ฐ์ดํ„ฐ โ†’ ์ˆซ์ž ๋ณ€ํ™˜ (Feature), One-Hot Encoding โ€ข ์ˆ˜ํ•™ ๋ชจํ˜•์˜ ๋ชจ์ˆ˜(Parameter) ์ถ”์ • ๋ฐฉ๋ฒ• โ–ช Loss Function (Objective, Cost Function) = Error(Guessing value โ€“ Actual value) ํ•จ์ˆ˜ โ–ช Error๋ฅผ ์ตœ์†Œํ™” ์‹œํ‚ค๋Š” ๋ชจ์ˆ˜ (Parameter, ๊ฐ€์ค‘์น˜) ์ฐพ๊ธฐ โ–ช Gradient Descent method (๊ฒฝ์‚ฌํ•˜๊ฐ•๋ฒ•) โ€ข Train/Validation/Test Set์œผ๋กœ ๋ฐ์ดํ„ฐ ๋ถ„๋ฆฌ โ€“ ์ผ๋ฐ˜ํ™”
  30. Typical Machine Learning Process Collect, prepare and label training data

    Choose and optimize ML algorithm Train and tune ML models Set up and manage environments for training Deploy models in production Scale and manage the production environment 1 2 3
  31. Set up and track experiment Choose model Debug, compare, and

    evaluate experiments Monitor quality, detect drift, and retrain Share, review, and collaborate Machine Learning is iterative
  32. Amazon SageMaker Label data Aggregate & prepare data Store &

    share features Auto ML Spark/R Detect bias Visualize in notebooks Pick algorithm Train models Tune parameters Debug & profile Deploy in production Manage & monitor CI/CD Human review Ground Truth Data Wrangler Feature store Autopilot Processing Clarify Studio Notebooks Built-in or Bring-your-own Experiments Spot Training Distributed Training Automatic Model Tuning Debugger Model Hosting Multi-model Endpoints Model Monitor Pipelines Augmented AI AMAZON SAGEMAKER EDGE MANAGER SAGEMAKER STUDIO IDE AMAZON SAGEMAKER JUMPSTART VISION SPEECH TEXT SEARCH CHATBOTS PERSONALIZATION FORECASTING FRAUD CONTACT CENTERS Deep Learning AMIs & Containers GPUs & CPUs Elastic Inference Trainium Inferentia FPGA AI SERVICES ML SERVICES FRAMEWORKS & INFRASTRUCTURE DeepGraphLibrary Amazon Rekognition Amazon Polly Amazon Transcribe +Medical Amazon Lex Amazon Personalize Amazon Forecast Amazon Comprehend +Medical Amazon Textract Amazon Kendra Amazon CodeGuru Amazon Fraud Detector Amazon Translate INDUSTRIAL AI CODE AND DEVOPS Amazon DevOps Guru Voice ID For Amazon Connect Contact Lens Amazon Monitron AWS Panorama + Appliance Amazon Lookout for Vision Amazon Lookout for Equipment Amazon HealthLake HEALTHCARE AI Amazon Lookout for Metrics ANOMOLY DETECTION Amazon Transcribe for Medical Amazon Comprehend for Medical ๋ชจ๋“  ๊ฐœ๋ฐœ์ž๋ฅผ ์œ„ํ•œ ๋‹ค์–‘ํ•œ ์ธ๊ณต ์ง€๋Šฅ ๋„๊ตฌ ์ œ๊ณต
  33. Amazon SageMaker Label data Aggregate & prepare data Store &

    share features Auto ML Spark/R Detect bias Visualize in notebooks Pick algorithm Train models Tune parameters Debug & profile Deploy in production Manage & monitor CI/CD Human review Ground Truth Data Wrangler Feature store Autopilot Processing Clarify Studio Notebooks Built-in or Bring-your-own Experiments Spot Training Distributed Training Automatic Model Tuning Debugger Model Hosting Multi-model Endpoints Model Monitor Pipelines Augmented AI AMAZON SAGEMAKER EDGE MANAGER SAGEMAKER STUDIO IDE AMAZON SAGEMAKER JUMPSTART VISION SPEECH TEXT SEARCH CHATBOTS PERSONALIZATION FORECASTING FRAUD CONTACT CENTERS Deep Learning AMIs & Containers GPUs & CPUs Elastic Inference Trainium Inferentia FPGA AI SERVICES ML SERVICES FRAMEWORKS & INFRASTRUCTURE DeepGraphLibrary Amazon Rekognition Amazon Polly Amazon Transcribe +Medical Amazon Lex Amazon Personalize Amazon Forecast Amazon Comprehend +Medical Amazon Textract Amazon Kendra Amazon CodeGuru Amazon Fraud Detector Amazon Translate INDUSTRIAL AI CODE AND DEVOPS Amazon DevOps Guru Voice ID For Amazon Connect Contact Lens Amazon Monitron AWS Panorama + Appliance Amazon Lookout for Vision Amazon Lookout for Equipment Amazon HealthLake HEALTHCARE AI Amazon Lookout for Metrics ANOMOLY DETECTION Amazon Transcribe for Medical Amazon Comprehend for Medical ๋ชจ๋“  ๊ฐœ๋ฐœ์ž๋ฅผ ์œ„ํ•œ ๋‹ค์–‘ํ•œ ์ธ๊ณต ์ง€๋Šฅ ๋„๊ตฌ ์ œ๊ณต
  34. End-to-End Machine Learning Platform Zero setup Flexible Model Training Pay

    by the second $ Amazon SageMaker ์†์‰ฌ์šด ๊ธฐ๊ณ„ ํ•™์Šต ๋ชจ๋ธ ์ƒ์„ฑ, ํ›ˆ๋ จ ๋ฐ ์„œ๋น„์Šค ๋ฐฐํฌ ์™„์ „ ๊ด€๋ฆฌ ์„œ๋น„์Šค
  35. Amazon SageMaker Studio ๊ธฐ๊ณ„ ํ•™์Šต ๋ชจ๋ธ ๊ฐœ๋ฐœ ๋ฐ ๋ฐฐํฌ๋ฅผ ์œ„ํ•œ

    ์ตœ์ดˆ์˜ ์™„์ „ ํ†ตํ•ฉ ๊ฐœ๋ฐœ ํ™˜๊ฒฝ (IDE) Collaboration at scale ์ฝ”๋“œ ์˜์กด์„ฑ ์ถ”์  ์—†์ด ํ™•์žฅ ๊ฐ€๋Šฅํ•œ ๋…ธํŠธ๋ถ ๊ณต์œ  Easy experiment management ์ˆ˜์ฒœ ๊ฐœ์˜ ๋ชจ๋ธ ์‹คํ—˜์„ ๊ตฌ์„ฑ, ์ถ”์  ๋ฐ ๋น„๊ต Automatic model generation ์ฝ”๋“œ ์ž‘์„ฑ ์—†์ด ๋ฐ์ดํ„ฐ๋ฅผ ๊ฐ€์ง€๊ณ  ์ž๋™ ๋ชจ๋ธ ์ƒ์„ฑ Higher quality ML models ์˜ค๋ฅ˜ ์ž๋™ ๋””๋ฒ„๊น… ๋ฐ ์‹ค์‹œ๊ฐ„ ์˜ค๋ฅ˜ ๊ฒฝ๋ณด ๋ชจ๋ธ ๋ชจ๋‹ˆํ„ฐ๋ง ๋ฐ ๊ณ ํ’ˆ์งˆ ์œ ์ง€ Increased productivity ์™„์ „ ์ž๋™ํ™”๋œ ๋จธ์‹  ๋Ÿฌ๋‹ ์›Œํฌํ”Œ๋กœ ๊ตฌ์ถ•
  36. Amazon SageMaker Studio ๊ธฐ๊ณ„ ํ•™์Šต ๋ชจ๋ธ ๊ฐœ๋ฐœ ๋ฐ ๋ฐฐํฌ๋ฅผ ์œ„ํ•œ

    ์ตœ์ดˆ์˜ ์™„์ „ ํ†ตํ•ฉ ๊ฐœ๋ฐœ ํ™˜๊ฒฝ (IDE)
  37. โ€ข Jupyter notebooks โ€ข Support for Jupyter Lab โ€ข Multiple

    built-in kernels โ€ข Install external libraries and kernels โ€ข Integrate with Git โ€ข Sample notebooks โ€ข VPC Integration for integrated security
  38. Amazon SageMaker Training How does training happen XGBoost validation(optional) test(optional

    ECR S3 ML Instance ml.m4.xlarge xgboost linear-learner PCA DeepAR BlazingText Image classification โ€ฆ Object Detection Images S3 SageMaker Notebook SageMaker Training Job train Model
  39. Model artifacts Amazon SageMaker Deployment Hosting Services Inference Image Training

    Image Training Data Endpoint Amazon SageMaker Amazon S3 Amazon ECR
  40. Model artifacts Amazon SageMaker Deployment Hosting Services Inference Image Training

    Image Training Data Endpoint Amazon SageMaker Amazon S3 Amazon ECR Model artifacts Inference Image
  41. Amazon SageMaker Deployment SageMaker Endpoints (Private API) Auto Scaling group

    Availability Zone 1 Availability Zone 2 Availability Zone 3 Elastic Load Balancing Model Endpoint Client Deployment / Hosting Amazon SageMaker ML Compute Instances Input Data (Request) Prediction (Response)
  42. Amazon SageMaker Deployment SageMaker Endpoints (Public API) Auto Scaling group

    Availability Zone 1 Availability Zone 2 Availability Zone 3 Elastic Load Balancing Model Endpoint Amazon API Gateway Client Deployment / Hosting Amazon SageMaker ML Compute Instances Input Data (Request) Prediction (Response)
  43. Classification โ€ข Linear Learner โ€ข XGBoost โ€ข KNN Working with

    Text โ€ข BlazingText โ€ข Supervised โ€ข Unsupervised* Recommendation โ€ข Factorization Machines Forecasting โ€ข DeepAR Topic Modeling โ€ข LDA โ€ข NTM Amazon SageMaker์—์„œ ์ œ๊ณตํ•˜๋Š” Built-in Algorithms Sequence Translation โ€ข Seq2Seq* Clustering โ€ข KMeans Feature Reduction โ€ข PCA โ€ข Object2Vec Anomaly Detection โ€ข Random Cut Forests โ€ข IP Insights Computer Vision โ€ข Image Classi๏ฌcation โ€ข Object Detection โ€ข Semantic Segmentation Regression โ€ข Linear Learner โ€ข XGBoost โ€ข KNN https://docs.aws.amazon.com/sagemaker/latest/dg/algos.html
  44. Model Deployment: Built-in Algorithms xgboost linear-learner PCA DeepAR BlazingText Image

    classi๏ฌcation โ€ฆ Object Detection Built-in Algorithm Images Elastic Container Registry
  45. BYOM Deployment: Model Artifacts (model.tar.gz) model.tar.gz/ |- model.pth |- code/

    |- inference.py |- requirements.txt model.tar.gz/ |- model | |- [model_version_number] | |- variables | |- saved_model.pb |- code |- inference.py |- requirements.txt TensorFlow (>= 1.11) PyTorch (>=1.2.0)
  46. def model_fn(model_dir): # Loads a model for inference model =

    Your_Model() return model def input_fn(input_data, content_type): # Deserializes the input data return decoder.decode(input_data, content_type) def predict_fn(input_data, model): # Calls a model on data deseralized by input_fn return model(input_data) def output_fn(prediction, content_type): # Serializes predictions from predict_fn return encoder.encode(prediction, content_type) https://github.com/aws/sagemaker-inference-toolkit BYOM Deployment: Inference Handler Script https://github.com/tensorflow/serving def input_handler(data, context): # Pre-process request input before it is sent to TensorFlow Serving REST API if context.request_content_type == 'application/json': pass if context.request_content_type == 'text/csv': pass def output_handler(response, context): # Post-process TensorFlow Serving output before it is returned to the client response_content_type = context.accept_header prediction = response.content return prediction, response_content_type
  47. A fully managed service that enables data scientists and developers

    to quickly and easily build machine-learning based models into production smart applications. Amazon SageMaker
  48. Amazon SageMaker Studio ๊ธฐ๊ณ„ ํ•™์Šต ๋ชจ๋ธ ๊ฐœ๋ฐœ ๋ฐ ๋ฐฐํฌ๋ฅผ ์œ„ํ•œ

    ์ตœ์ดˆ์˜ ์™„์ „ ํ†ตํ•ฉ ๊ฐœ๋ฐœ ํ™˜๊ฒฝ (IDE) ํ•™์Šต ๋ชจ๋ธ ๊ตฌ์ถ• ๋ฐ ํ˜‘์—… SageMaker Notebooks SageMaker Pipelines ์™„์ „ ์ž๋™ํ™”๋œ ๋จธ์‹  ๋Ÿฌ๋‹ ์›Œํฌํ”Œ๋กœ ๊ตฌ์ถ• ํ•™์Šต ๋ชจ๋ธ ํ›ˆ๋ จ ๋ฐ ๊ฒ€์ฆ SageMaker Training Job One-click ๋ฐฐํฌ , ๋ชจ๋ธ ๋ชจ๋‹ˆํ„ฐ๋ง ๋ฐ ๊ณ ํ’ˆ์งˆ ์œ ์ง€ SageMaker Endpoints ํ•™์Šต ๋ชจ๋ธ ์ตœ์ ํ™” ๋ฐ ๋‹ค์ค‘ ์•Œ๊ณ ๋ฆฌ์ฆ˜ ํŠœ๋‹ SageMaker HPO
  49. As-Is: Automatic Image Tagging Amazon Kinesis Data Streams Client AWS

    Lambda Amazon S3 bucket with images Amazon API Gateway Amazon OpenSearch Service Amazon Rekognition
  50. To-Be: Visual Search Amazon Kinesis Data Streams Client AWS Lambda

    Amazon S3 bucket with images Amazon API Gateway Amazon OpenSearch Service
  51. Visual Search Amazon Kinesis Data Streams Client AWS Lambda Amazon

    S3 bucket with images Amazon API Gateway Amazon SageMaker Amazon OpenSearch Service Notebook Model Models bucket SageMaker Endpoint Train
  52. ๋ฌธ์ œ ํ•ด๊ฒฐ์— ๊ฐ€์žฅ ์ ํ•ฉํ•œ AI ์„œ๋น„์Šค ์„ ํƒ ๋ฌธ์ œ ํ•ด๊ฒฐ์„ ์œ„ํ•œ

    ML ๋ชจ๋ธ ๊ฐœ๋ฐœ ML ๋ชจ๋ธ ๋ฐฐํฌ ๋ฐ ๋ชจ๋‹ˆํ„ฐ๋ง ์„œ๋น„์Šค ๊ฐœ๋ฐœ ๋ฌธ์ œ ์ •์˜ AI ์„œ๋น„์Šค ํ™œ์šฉ Business Problem โ€“ ML problem framing SageMaker ํ™œ์šฉ ์„œ๋น„์Šค ์ถœ์‹œ How to choose the most relevant advertisement? How to tag millions of images in fast, cost-efficient way? How to build our own ML model? How to build Visual Search Application? Wrap-up Our Business Problem
  53. AI/ML Stack์„ ํ™œ์šฉํ•œ ๋น„์ฆˆ๋‹ˆ์Šค ๋ฌธ์ œ ํ•ด๊ฒฐ ๊ณผ์ • ๋ฌธ์ œ ํ•ด๊ฒฐ์— ๊ฐ€์žฅ

    ์ ํ•ฉํ•œ AI ์„œ๋น„์Šค ์„ ํƒ ๋ฌธ์ œ ํ•ด๊ฒฐ์„ ์œ„ํ•œ ML ๋ชจ๋ธ ๊ฐœ๋ฐœ ML ๋ชจ๋ธ ๋ฐฐํฌ ๋ฐ ๋ชจ๋‹ˆํ„ฐ๋ง ์„œ๋น„์Šค ๊ฐœ๋ฐœ ๋ฌธ์ œ ์ •์˜ AI ์„œ๋น„์Šค ํ™œ์šฉ Business Problem โ€“ ML problem framing SageMaker ํ™œ์šฉ ์„œ๋น„์Šค ์ถœ์‹œ
  54. Amazon SageMaker Label data Aggregate & prepare data Store &

    share features Auto ML Spark/R Detect bias Visualize in notebooks Pick algorithm Train models Tune parameters Debug & profile Deploy in production Manage & monitor CI/CD Human review Ground Truth Data Wrangler Feature store Autopilot Processing Clarify Studio Notebooks Built-in or Bring-your-own Experiments Spot Training Distributed Training Automatic Model Tuning Debugger Model Hosting Multi-model Endpoints Model Monitor Pipelines Augmented AI AMAZON SAGEMAKER EDGE MANAGER SAGEMAKER STUDIO IDE AMAZON SAGEMAKER JUMPSTART VISION SPEECH TEXT SEARCH CHATBOTS PERSONALIZATION FORECASTING FRAUD CONTACT CENTERS Deep Learning AMIs & Containers GPUs & CPUs Elastic Inference Trainium Inferentia FPGA AI SERVICES ML SERVICES FRAMEWORKS & INFRASTRUCTURE DeepGraphLibrary Amazon Rekognition Amazon Polly Amazon Transcribe +Medical Amazon Lex Amazon Personalize Amazon Forecast Amazon Comprehend +Medical Amazon Textract Amazon Kendra Amazon CodeGuru Amazon Fraud Detector Amazon Translate INDUSTRIAL AI CODE AND DEVOPS Amazon DevOps Guru Voice ID For Amazon Connect Contact Lens Amazon Monitron AWS Panorama + Appliance Amazon Lookout for Vision Amazon Lookout for Equipment Amazon HealthLake HEALTHCARE AI Amazon Lookout for Metrics ANOMOLY DETECTION Amazon Transcribe for Medical Amazon Comprehend for Medical ๋ชจ๋“  ๊ฐœ๋ฐœ์ž๋ฅผ ์œ„ํ•œ ๋‹ค์–‘ํ•œ ์ธ๊ณต ์ง€๋Šฅ ๋„๊ตฌ ์ œ๊ณต
  55. References โ€ข Image Insights - Automatic Image Tagging & Analysis

    System: https://tinyurl.com/kxydd2wn โ€ข Visual Image Search with Amazon SageMaker and Amazon ES: https://tinyurl.com/53yubfzw โ€ข Amazon Rekognition์œผ๋กœ ๋‚˜๋งŒ์˜ ์ปดํ“จํ„ฐ ๋น„์ „ ๋ชจ๋ธ ๋งŒ๋“ค๊ธฐ: https://youtu.be/tioJru6b_4M โ€ข SageMaker Immersion Day Workshop โœฏโœฏโœฏ : https://sagemaker-immersionday.workshop.aws/ โ€ข SageMaker Examples (100+) โœฏโœฏโœฏ : https://sagemaker-examples.readthedocs.io/ โ€ข Advanced SageMaker Workshop: https://sagemaker-workshop.com/ โ€ข Amazon SageMaker ๋ฐ๋ชจ (2020-03-25) โœฏโœฏโœฏ : https://youtu.be/miIVGlq6OUk โ€ข How Startups Deploy Pretrained Models on Amazon SageMaker: https://tinyurl.com/4nwy9bd5 โ€ข Deploy trained Keras or TensorFlow models using Amazon SageMaker: https://tinyurl.com/nf2rwrw9 โ€ข Host multiple TensorFlow computer vision models using Amazon SageMaker multi-model endpoints: https://tinyurl.com/6w8f4862