Mais conteúdo relacionado Semelhante a AWS AI Solutions (20) Mais de Amazon Web Services Japan (20) AWS AI Solutions1. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Makoto Shimura, Data Science Solution Architect
Amazon Web Services Japan, K. K.
2017.11.15
AWS AI Solutions
3. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon における機械学習の取り組み
5. Amazon における Deep Learning の取り組み
• 応⽤研究
• 基礎研究
• Alexa
• 需要予測
• リスク分析
• 検索
• レコメンド
• AI サービス群
• Q&A システム
• サプライチェーン最適化
• 広告
• 機械翻訳
• ビデオコンテンツ分析
• ロボティクス
• さまざまなコンピュータビジョン
• 種々の⾃然⾔語処理/理解
5
9. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS が提供する機械学習サービス
10. 4 レイヤーから構成される AWS の AI サービス
10
Services Amazon
Rekognition
Amazon
Polly
Amazon
Lex
Platform
Amazon
Machine
Learning
Engines
TensorFlow Caffe Torch Theano CNTK Keras
CPU IoT MobileInfrastructure GPU
Apache Spark
&
Amazon EMR
Amazon
Kinesis
AWS
Batch
Amazon
ECS
MXNet
AWS Deep Learning AMI
11. 4 レイヤーから構成される AWS の AI サービス
11
Services Amazon
Rekognition
Amazon
Polly
Amazon
Lex
Platform
Amazon
Machine
Learning
Engines
TensorFlow Caffe Torch Theano CNTK Keras
CPU IoT MobileInfrastructure GPU
Apache Spark
&
Amazon EMR
Amazon
Kinesis
AWS
Batch
Amazon
ECS
MXNet
AWS Deep Learning AMI
12. AI Services の役割
データ
学習 推論
⼤量の GPU
⼤規模データの処理
試⾏錯誤の繰り返し
データの⾼速な加⼯整形
⼤規模データの保管
⼤量の GPU と CPU
継続的なデプロイ
IoT デバイスで動作
16. Polly - 24種類の⾔語で50種類の⾳声
⾔語 ⼥性 男性
英語(オーストラリア) Naja Mads
英語(インド) Raveena
⽇本語 Mizuki Takumihtt
ps://docs.
aws.amaz
on.com/p
olly/latest/
dg/voicelis
t.html
ヨーロッパ/中東/アフリカ地域: アジア太平洋地域:北アメリカ/南アメリカ地域:
⾔語 ⼥性 男性
フランス語(カナダ) Chantal
ポルトガル語(ブラジル) Vitória Ricardo
英語(⽶国) Joanna Joey
Salli Justin
Kendra Matthew
Kimberly
Ivy
スペイン語(⽶国) Penélope Miguel
⾔語 ⼥性 男性
デンマーク語 Naja Mads
オランダ語 Lotte Ruben
フランス語 Céline Mathieu
ドイツ語 Marlene Hans
Vicki
アイスランド語 Dóra Karl
イタリア語 Carla Giorgio
ノルウェー語 Liv
ポーランド語 Ewa Jacek
Maja Jan
ポルトガル語(イベリア) Inês Cristiano
ルーマニア語 Carmen
ロシア語 Tatyana Maxim
スペイン語(カスティリヤ) Conchita Enrique
スウェーデン語 Astrid
トルコ語 Filiz
英語(英国) Amy Brian
Emma
英語(ウェールズ) Geraint
ウェールズ語 Gwyneth
https://docs.aws.amazon.com/polly/latest/dg/voicelist.html
18. SSML による話速や話し⽅の調整
Speech Synthesis Markup Language (SSML) v1.1 に準拠したド
キュメントを⼊⼒テキストとして利⽤できる
SSML タグを使⽤することで、発⾳、ボリューム、話す速度など、⾳
声のさまざまな要素をカスタマイズできる
ねぇちょっとちょっと,ここだけの話だけどさ
<speak>
<prosody rate="x-fast">
ねえ,ちょっとちょっと,
<amazon:effect name="whispered">
ここだけの話だけどさ
</amazon:effect>
</prosody>
</speak>
19. レキシコンによる特殊な単語の発話
Pronounciation Lexicon Specification(PLS) v1.0 に準拠したドキュメン
トをレキシコンとして登録て利⽤できる
『単語とフレーズのマッピング』や『⾔語で⼀般的でない単語の発⾳』を
定義し,発⾳をカスタマイズすることができる
<lexeme>
<grapheme>W3C</grapheme>
<alias>World Wide Web Consortium</alias>
</lexeme>
W3C is a Consortium
単語 (graphme) に対応する
発話フレーズ (alias) を設定できる
<lexeme>
<grapheme>Kaja</grapheme>
<grapheme>kaja</grapheme>
<grapheme>KAJA</grapheme>
<phoneme>"kaI.@</phoneme>
</lexeme>
My daughterʼs name is Kaja
⾳素 (phoneme) に紐づく
単語 (graphme) は複数指定できる
22. 東京リージョンと男性ボイスの追加
• 東京リージョンで Polly が利⽤可能に
• より⾼速にレスポンスを返すことができるように
• ⽇本語の男性ボイス「Takumi」が利⽤可能に
• 従来の⼥性ボイス「mizuki」に加えて,さまざまなユース
ケースで利⽤していただけるように
• 新しい声の出し⽅が可能に
• ⼤きな⼈の声と⼩さな⼈の声
22
25. Rekognition - 物体とシーンの検出
• DetectLabels API を利⽤すると、画像から識別した⾞、ペット、家具など、
数千もの物体にラベルを付け、信頼スコアを取得できる
• 信頼スコアは 0〜100 の値で⽰され、識別結果が正しいかどうかの可能性を
意味する
Maple
Plant
Villa
Garden
Water
Swimming Pool
Tree
Potted Plant
Backyard
❖ ⼤規模な画像ライブラリを
検索、フィルタリング、管
理するために必要な情報を
取得できる
❖ 写真、不動産、旅⾏アプリ
など様々なアプリケーショ
ンに利⽤可能
26. Rekognition - 顔分析
• DetectFaces API を利⽤すると、画像内の顔の位置を検出し、感情、ポーズ、
瞳が開いているかどうかなどの顔属性を分析できる
❖ 画像のトリミングや広告を
重ねる際に顔を避けるよう
な処理
❖ ユーザがどのようなカテゴ
リに属するか、ユーザが抱
いている感情などの推定
❖ ⼀番良い写真のレコメンド
27. Rekognition - 顔の⽐較
• 顔の⽐較機能を利⽤すると、2 つの画像の顔が同⼀⼈物である可能性を
推定可能
❖ アプリケーションやデバイス
に顔認識機能を追加可能
❖ 物理的なセキュリティ制御を
拡張可能
28. Rekognition - 顔認識
• IndexFaces API と SearchFacesByImage API を利⽤すると、⼤規模な顔の
コレクションの中から似た顔を⾒つけることで画像の中にいる⼈物を識別する
ことが可能
❖ ソーシャルやメッセージング
アプリのタグ付機能
❖ ⾏⽅不明の⼈を写真から探す
機能
31. Rekognition – Deep Learning 処理
Conv 1 Conv 2 Conv n
…
…
Feature Maps
Labrador
Dog
Beach
Outdoors
Softmax
Probability
Fully
Connected
Layer
32. Rekognition – Ground Truth データ⽣成
版管理された
トレーニング&テストデータ
トレーニング
ラベル付された画像
QA 評価
利用者
APIレスポンス
フィードバック
DNNモデル
ラベル付前画像
人間参加型
アクティブ・ラーニングシステ
ム
推論
画像元
ローカリゼーション
画像検証
画像注釈付
37. Lex – 仕組み: ボットの構成要素
Utterances
BookHotel
Intents
Slots
Fulfillment
intent はユーザが⼊⼒した⾃然⾔語
に応答してfulfillmentを実⾏する
intent を発動する⼝頭、もしくは、
⼊⼒されるフレーズ
Slot は intent を満たすために
要求される⼊⼒データ
intent を実現する
ビジネスロジック
Prompt
Slot を引き出すためのフレーズ
38. Lex - ユースケース: 情報ボット
患者向け診察予約ボットを構築する
1.患者がケア施設に午後3時の
予約を要求する 2.Lex は予約のスケジューリングが
リクエストされたことを認識する
3.Lex が予約について都合の良い
曜日を尋ねる
4.予約時間が確保される
5.患者は木曜日の午後3時に
予約完了の通知を受ける
ユーザ入力情報
Lex のテキストレスポンス
39. Lex - 仕組み: “Book a Hotel”
“Book a Hotel in
NYC”
Hotel Booking
City New York City
CheckIn
CheckOut
⾳声
⾃然⾔語理解(NLU)
Book Hotel
NYC
⾃動⾳声認識(ASR)
Hotel Booking
New York City
a
in
テキスト
Intent/Slot
モデル
40. Lex - 仕組み: “Book a Hotel”
“When would you
check in ?”
Polly(TTS)
テキスト⾳声
Hotel Booking
City New York City
CheckIn
CheckOut
“Can I go ahead
with the booking?
Prompt
“When would you check in ?”
No
41. Lex - 仕組み: “Book a Hotel”
“When would you
check in ?”
Polly(TTS)
テキスト⾳声
Prompt
“When would you check in ?”
“November
30th“
Hotel Booking
City New York City
CheckIn
CheckOut
42. Lex - 仕組み: “Book a Hotel”
“November
30th“
Hotel Booking
City New York City
CheckIn
CheckOut
⾃然⾔語理解(NLU)⾃動⾳声認識(ASR)
Hotel Booking
November 30thNovember 30th
テキスト⾳声
Intent/Slot
モデル
November 30th
43. Lex - 仕組み: “Book a Hotel”
“When would you
check out ?”
Polly(TTS)
テキスト⾳声
Hotel Booking
City New York City
CheckIn
CheckOut
“Can I go ahead
with the booking?
Prompt
“When would you check out ?”
No
November 30th
44. Lex - 仕組み: “Book a Hotel”
“When would you
check out ?”
Polly(TTS)
テキスト⾳声
Prompt
“When would you check out ?”
Hotel Booking
City New York City
CheckIn
CheckOut
“Can I go ahead
with the booking?
No
“December
2nd“
November 30th
45. Lex - 仕組み: “Book a Hotel”
“December
2nd“
Hotel Booking
City New York City
CheckIn
CheckOut
⾃然⾔語理解(NLU)⾃動⾳声認識(ASR)
Hotel Booking
December 2ndDecember 2nd
テキスト⾳声
Intent/Sl
ot
モデル
December 2nd
November 30th
46. Lex - 仕組み: “Book a Hotel”
Hotel Booking
City New York City
CheckIn
CheckOut December 2nd
“Your hotel is booked
for Nov 30th”
Confirmation: “Your hotel
is booked for Nov 30th”
Yes
Polly(TTS)
テキスト⾳声
“Can I go ahead
with the booking?
November 30th
48. 4 レイヤーから構成される AWS の AI サービス
48
Services Amazon
Rekognition
Amazon
Polly
Amazon
Lex
Platform
Amazon
Machine
Learning
Engines
TensorFlow Caffe Torch Theano CNTK Keras
CPU IoT MobileInfrastructure GPU
Apache Spark
&
Amazon EMR
Amazon
Kinesis
AWS
Batch
Amazon
ECS
MXNet
AWS Deep Learning AMI
50. Amazon Machine Learning
フルマネージドの予測モデル & API を提供
50
• 線形回帰,2項ロジスティック回帰,多項
ロジスティック回帰の3種類のアルゴリズ
ムをサポート
• Cross Validation や正則化,精度評価ま
で含んでおり,簡単にモデル構築が可能
• 構築したモデルを使って,新しいデータを
API経由で予測可能
• お⼿軽にシンプルな予測モデルをシステム
に組み込んで利⽤できる
51. Amazon EMR (Elastic MapReduce)
データ
学習 推論
⼤量の GPU
⼤規模データの処理
試⾏錯誤の繰り返し
データの⾼速な加⼯整形
⼤規模データの保管
⼤量の GPU と CPU
継続的なデプロイ
IoT デバイスで動作
52. Amazon EMR (Elastic MapReduce)
フルマネージドな Hadoop を提供しており,ク
ラスタの構築,構成変更,破棄まで管理可能
データの加⼯整形を⾏なって,機械学習に必要な
データを抜き出すことが可能
MLlib を使った Spark アプリケーションを開発す
ることで,スケーラブルに機械学習を実⾏するこ
とができる
開発・本番と,ワークロードに応じて異なるクラ
スタを⽴ち上げてジョブを実⾏可能
52
55. 4 レイヤーから構成される AWS の AI サービス
55
Services Amazon
Rekognition
Amazon
Polly
Amazon
Lex
Platform
Amazon
Machine
Learning
Engines
TensorFlow Caffe Torch Theano CNTK Keras
CPU IoT MobileInfrastructure GPU
Apache Spark
&
Amazon EMR
Amazon
Kinesis
AWS
Batch
Amazon
ECS
MXNet
AWS Deep Learning AMI
56. Deep Learning AMI による⾼速な環境構築
データ
学習 推論
⼤量の GPU
⼤規模データの処理
試⾏錯誤の繰り返し
データの⾼速な加⼯整形
⼤規模データの保管
⼤量の GPU と CPU
継続的なデプロイ
IoT デバイスで動作
57. Deep Learning AMI による⾼速な環境構築
57
AWS Deep Learning AMI
MXNet TensorFlow Caffe & Caffe2
Theano Cognitive Toolkit Torch
Keras
Nvidia CUDA & cuDNN Python 2 & Python 3
Intel MKL Anaconda
Amazon EC2 (Amazon Linux / Ubuntu)
58. AWS は MXNet を全⾯的にサポート
マルチ GPU でのスケーラビリティに優れている
AWS 社員もコミッターとして活躍
Keras や CoreML 対応など,積極的に開発が進められている
58 http://aws.typepad.com/sajp/2016/11/mxnet-default-framework-deep-learning-aws.html
59. 4 レイヤーから構成される AWS の AI サービス
59
Services Amazon
Rekognition
Amazon
Polly
Amazon
Lex
Platform
Amazon
Machine
Learning
Engines
TensorFlow Caffe Torch Theano CNTK Keras
CPU IoT MobileInfrastructure GPU
Apache Spark
&
Amazon EMR
Amazon
Kinesis
AWS
Batch
Amazon
ECS
MXNet
AWS Deep Learning AMI
61. 次世代GPUインスタンス P3 Instances!
• NVIDIAの最新GPU Tesla V100
• 最も強⼒な GPU-based プラットフォーム
• ディープラーニングで P2 に⽐べ最⼤ 14 倍の性能向上
61
NVIDIA Roadmap
(GTC 2017)
62. GPU 性能⽐較
NVIDIA GPU アーキテクチャ
Kepler (P2 インスタンス)
→ Maxwell
→ Pascal
→ Volta (P3 インスタンス)
0
1000
2000
3000
4000
5000
6000
K80 P100 V100
Resnet-50 8 GPU (Images/sec)
7.2X
65. Greengrass による IoT デバイス上での推論
データ
学習 推論
⼤量の GPU
⼤規模データの処理
試⾏錯誤の繰り返し
データの⾼速な加⼯整形
⼤規模データの保管
⼤量の GPU と CPU
継続的なデプロイ
IoT デバイスで動作
66. Greengrass による IoT デバイス上での推論
機械学習の推論処理を,デバイス上で直接⾏うことができる
通信が発⽣しないため,⾼速に推論結果を返すことが可能
クラウドと同期することで,新しい機械学習モデルに更新する
ことができる
Device
State
Action
Device
Gateway
Messages
Authentication
& Authorization
Security
67. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
事例
67
68. Motorola Solutions における画像認識の活⽤事例
警察官が利⽤できるデバイス, サービスを提供
不明者の発⾒にAmazonの画像認識、⾳声認識を活⽤
AWS re:Invent 2016: Machine Learning State of the Union Mini Con (MAC206) – YouTube
https://youtu.be/HqsUfyu0XJc?t=183329
• カメラでリアルタイムに顔を抽出して
AWS に送信
• DBにデータを保存して Rekognition に
顔認識顔リクエストを送信
• マッチしたら、イベントでPollyを呼び
出して,⾳声でアラートを通知
69. RoomClip さま
Rekognition + Amazon Machine Learning の事例
部屋のインテリア実例共有サイト
「部屋全体を映している画像かどうか」を判定
マネージドサービスを組み合わせることで,低コストで機械学
習サービスを構築
69
Amazon RekognitionとMachine Learningで画像判定機を気軽に作る
http://engineer.roomclip.jp/entry/20
部屋画像の
ラベルを抽出
特定ラベルの確信度を
独⽴変数として
部屋写真か否か判定する
モデルを構築
構築したモデルで
その他画像を判定
Rekognition Amazon
Machine Learning
71. Capital One さま
⾳声認識の活⽤事例
• 全⽶最⼤のネットバンク,4位のクレジットカード発⾏会社
• Amazon Alexa を活⽤した⾳声ベースのバンキングアプリ
• ユーザのアクセシビリティを改善する取り組み
AWS re:Invent 2016: How Capital One Built a Voice-Based Banking Skill for Amazon Echo (ALX201) – YouTube
https://www.youtube.com/watch?v=-MtwpZFmexg
72. Zillow さま
Spark MLlib によるレコメンデーション
• Zillow は住宅のマーケットプレイスに関するWebサービスを展開
• さまざまなレコメンデーションを活⽤
• セール物件 / 貸出可能物件をメールで利⽤者にプッシュ
• 「この物件に似た物件」
• パーソナライズド検索
• 住宅購⼊確率,物件売却
確率の予測
• 類似画像 / 動画
AWS re:Invent 2016: Zillow Group: Developing Classification and Recommendation Engines with Amazon EMR and Apache Spark (MAC303)
https://www.slideshare.net/AmazonWebServices/aws-reinvent-2016-zillow-group-developing-classification-and-recommendation-engines-with-amazon-
emr-and-apache-spark-mac303
75. まとめ : Amazon AI サイト、Amazon AI Blog
https://aws.amazon.com/jp/amazon-ai/
https://aws.amazon.com/jp/blogs/ai/
77. re:Invent 11/27-12/1 @ ラスベガス
• ENT301 - Real-World AI and Deep Learning for the Enterprise
• ATC302 - How to Leverage AWS Machine Learning Services to
Analyze and Optimize your Google DoubleClick Campaign Manager
Data at Scale
• ALX319 - Itʼs All in the Data: The Machine Learning Behind Alexaʼs
AI Systems
• GPSBUS201 - GPS: Artificial Intelligence, Machine Learning, Deep
Learning: Cutting through the Hype
• ALX304 - Five Ways Artificial Intelligence Will Reshape How
Developers Think
77