Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
深層学習のはじめかたと活用事例
Search
mani3
July 26, 2018
Technology
370
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
深層学習のはじめかたと活用事例
mani3
July 26, 2018
More Decks by mani3
See All by mani3
meetup-lt-20190925.pdf
mani3
0
1.4k
Other Decks in Technology
See All in Technology
Rustuna: Rustによる高速なOptuna実装
pfn
PRO
0
200
hackers_champloo_2026_tidb
makocchi
0
170
PagerDuty Tech Hub-鳴らすけれど、人は動かない
ezaki
0
180
Rust で関数型ドメインモデリング
takonda
0
170
Code for Security プロジェクト紹介 2026年10月
yu23ki14
0
110
QA4AI 2026-Oct 生成AI時代の品質保証
tokuty
1
890
Running Kotlin + Quarkus with Lambda
nealle
1
4k
その Valkey 使いこなしていますか?
onk
PRO
5
1.6k
Kiro Crewで「みのるん式」仕事術やってみた
minorun365
PRO
2
570
サブエージェントと Claude Mods で作る独自 Advisor ツールの話
kenichiodo
2
170
Metadata - Section 1: HTML Basics
mohab1
0
120
AIカンパニーへの転換を支えた、エンジニアの仕事の再定義
kworkdev
PRO
2
1.3k
Featured
See All Featured
First, design no harm
axbom
PRO
2
1.3k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.6k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.2k
Un-Boring Meetings
codingconduct
0
460
Statistics for Hackers
jakevdp
799
230k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
450
Utilizing Notion as your number one productivity tool
mfonobong
4
620
The Art of Programming - Codeland 2020
erikaheidi
57
14k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
330
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.1k
brightonSEO & MeasureFest 2025 - Winning Strategies for Black Friday CRO & PPC - Christian Goodrich
cargoodrich
3
870
The browser strikes back
jonoalderson
0
1.8k
Transcript
深層学習のはじめかたと活用事例 深層学習のはじめかたと活用事例 2018-07-26 / テクトモ#3 ユニファ株式会社 Kazuya Shida 1
内容 内容 会社・サービス紹介 深層学習できること 深層学習で使うツール Python, TensorFlowなど 深層学習で使う環境 深層学習の開発の流れと実例 2
こちらのマークがあるスライドは発表時のみ こちらのマークがあるスライドは発表時のみ 写真の撮影はご遠慮ください 写真の撮影はご遠慮ください S 3
自己紹介 自己紹介 Μ 4 . 1
ユニファ株式会社 ユニファ株式会社 2016月4月 - 入社 2018月2月 - R&Dチーム スキル スキル
iOS: 6年 Android: 6年 Python: Flask, Sphinx好き 趣味 趣味 ランニング・マラソン þ 4 . 2
Deep Learning の出会い Deep Learning の出会い Udacity Deep Learning Nanodegree
Program 2017年01月 ~ 2017年07月 4 . 3
ユニファ株式会社 ユニファ株式会社 2013年5月 設立 本社: 名古屋 保育園向けのサービス提供 5 . 1
ユニファ株式会社 ユニファ株式会社 スタートアップワールドカップ2017 優勝 5 . 2
サービス紹介 サービス紹介 ルクミーフォト ルクミー午睡チェック 6 . 1
ルクミーフォト ルクミーフォト 6 . 2
ルクミーフォト ルクミーフォト 保育園向けの写真販売サービス 壁張り Webサービス 6 . 3
ルクミーフォト ルクミーフォト 保育園向けの写真販売サービス έ έ έ 保育士 カメラマン
写真のアップロード ルクミーフォト 写真チェック 販売設定 Ȇ έ Ȇ έ Ȇ έ 保護者 写真の閲覧・購入 6 . 4
ルクミー午睡チェック ルクミー午睡チェック 6 . 5
ルクミー午睡チェック ルクミー午睡チェック 保育園向けの午睡チェックサービス 6 . 6
ルクミー午睡チェック 仕組み ルクミー午睡チェック 仕組み 6 . 7
R&Dチームのできた背景 R&Dチームのできた背景 このようなサービスを提供しているので課題が山積み ルクミーフォト 人手で写真チェックしている工数増加 子どもの顔認識精度の向上 写真データは大量にある ルクミー午睡チェック IoTデバイス(センサー)の改善 センサーデータの分析や信号処理
. 写真 + 深層学習から取り組み開始 6 . 8
深層学習でできること 深層学習でできること t 7 . 1
Deep Learning とは Deep Learning とは ニューラルネットワーク ニューラルネットワーク 階層が深くなればなるほどパラメータが非常に多い VGG16:
パラメータ数約1.4億 7 . 2
機械学習の開発の流れ 機械学習の開発の流れ ˭ データ収集 学習に利用できるデ ータを集める。 探索的データ分析 ē 前処理 集めたデータの加工
整形 ʫ モデルの構築 解決したい問題に応 じて、モデル、損失 関数を実装 ó モデルの学習 GPUマシンなどを用 いてトレーニングを 実行・評価する Ŀ 学習済みモデ ルのデプロイ 学習済みモデルをサ ービスにデプロイす る 7 . 3
なにができるか なにができるか Ȇ ǖ Ċ Ȝ 画像の ピクセル を使用して、 猫の有無
を検出する。 あなたの 好きな映画 を使用して、 好みの映画 を予 測する。 誰かのコメント を使用して、あるコメントが 幸せか 悲しいか を予測する。 オーディオファイル を使用して、オーディオの ト ランスクリプト を予測する。 参考: Grokking Deep Learning 7 . 4
MNIST MNIST 手書き文字の認識タスク https://www.tensorflow.org/versions/r1.0/get_started/mnist/beginners 7 . 5
Fashion-MNIST Fashion-MNIST TF1.9 keras を用いたチュートリアル class_names = [ 'T-shirt/top', 'Trouser',
'Pullover', 'Dress', 'Coat', 'Sandal', 'Shirt', 'Sneaker', 'Bag', 'Ankle boot'] https://www.tensorflow.org/tutorials/keras/basic_classification 7 . 6
深層学習で使うツール 深層学習で使うツール ʹ 8 . 1
Python Python NumPy 行列計算 scikit-learn 機械学習 pandas データの探索や加工、集計 Matplotlib データ可視化
Jupyter Notebook 対話環境 TensorFlow 深層学習 Pytorch 深層学習 8 . 2
Jupyter Notebook Jupyter Notebook 8 . 3
Jupyter Notebook Jupyter Notebook ノートブックという形式で、対話型で実行可能な環境 データ分析などグラフ・図を表示するに便利 8 . 4
クラウドサービス(Jupyter Notebook) クラウドサービス(Jupyter Notebook) Could Datalab Amazon SageMaker 8 .
5
Jupyter Notebook Jupyter Notebook Cloud Datalab Cloud Datalab Amazon SageMaker
Amazon SageMaker 8 . 6
Jupyter Notebook Jupyter Notebook Cloud Datalab や AWS SageMaker も
同じ ノートブック形式 のインターフェイス 学んでおいて損ないです 8 . 7
TensorFlow TensorFlow 2015/11 - 公開 2017/02 - v1.0 2017/07 -
v1.9 8 . 8
データフローグラフ データフローグラフ # x = tf.placeholder( tf.float32, shape=(None, 2), name='x')
w = tf.Variable( tf.random_uniform([2, 2]), name="w") y = tf.matmul(x, w) y = tf.identity(y, name="y") output = tf.nn.softmax(y) # with tf.Session() as sess: inputs = np.array( [[37.0, -23.0], [1.0, 4.0]]) print(sess.run(output, {x: inputs})) # => [[1.7769547e-16 1.0000000e+00] # [4.6664253e-01 5.3335750e-01]] 8 . 9
TensorFlow architecture TensorFlow architecture ハイレベルAPI(tf.estimator)を使うのがよい https://www.tensorflow.org/guide/premade_estimators 8 . 10
弊社でも TensorFlow を使用 弊社でも TensorFlow を使用 (Estimator対応中) (Estimator対応中) 8 .
11
深層学習で使う環境 深層学習で使う環境 Ĭ 9 . 1
GPUマシン GPUマシン GPUのクラウドサービスが複数ある サービス タイプ 料金 GPU AWS EC2 p2.xlarge
p3.2xlarge $1.542/h $5.243/h NVIDIA Tesla K80 NVIDIA Tesla V100 Google Cloud Platform Cloud TPUs $6.50/h GPU EATER a1.vegafe $0.6164/h AMD RADEON VEGA 9 . 2
の処理時間 の処理時間 Service Type Version MNIST AWS EC2 p2.xlarge TF1.7
1m26.489s GPU EATER a1.vegafe TF1.3 0m57.032s MNIST MNIST MNISTのコード: https://github.com/tensorflow/models/blob/master/tutorials/image/mnist/convolutional.py 9 . 3
の処理時間 の処理時間 Service Type Version MNIST AWS EC2 p3.2xlarge TF1.8
42.954s GCP Cloud TPUs TF1.9 38.325s MNIST MNIST MNISTのコード: https://github.com/tensorflow/models/blob/master/official/mnist/mnist_tpu.py 9 . 4
深層学習できる環境 深層学習できる環境 クラウドサービスが充実してる クラウドサービスが充実してる 9 . 5
深層学習の開発の流れと実例 深層学習の開発の流れと実例 ʓ 10 . 1
活用事例を説明する前に 活用事例を説明する前に 弊社でどんな課題があるか 弊社でどんな課題があるか 10 . 2
ルクミーフォト ルクミーフォト 写真販売サービスの要望や課題 自動でブレている写真を除いてほしい 販売に適さない写真を除いてほしい 園児ごとに枚数をカウントしてほしい ... 10 . 3
ルクミーフォトの課題解決 ルクミーフォトの課題解決 写真チェック を自動化するために深層学習を用いる 10 . 4
写真の学習のフロー 写真の学習のフロー Ȇ OK写真 ブレ ボケ 逆光 ... Deep Learning
学習 Ȇ 新しい写真 Ī 学習済み モデル 推論 Ȇ ű 写真+ラベル ó 10 . 5
大変だったこと 大変だったこと ~思ったより簡単じゃなかった~ ~思ったより簡単じゃなかった~ 10 . 6
①データセットの作成 ①データセットの作成 10 . 7
①データセットの作成 ①データセットの作成 学習させる写真+ラベルの教示データを作成する 今回では、 約30万枚 の写真を学習に使用 写真のダウンロードだけに 数日 かかる 10
. 8
データセットの作成は計画的に データセットの作成は計画的に 10 . 9
②学習が遅い問題 ②学習が遅い問題 10 . 10
②学習が遅い問題 ②学習が遅い問題 同じモデル、同じステップ数でも学習時間が異なる バッチ毎に Data Argumentation の処理を入れる となりがち 10 .
11
GPU 使用率を確認する GPU 使用率を確認する // $ nvidia-smi dmon -s puc
# gpu pwr temp sm mem enc dec mclk pclk # Idx W C % % % % MHz MHz 0 147 52 99 63 0 0 2505 784 0 65 51 0 0 0 0 2505 849 0 148 53 99 63 0 0 2505 784 0 66 52 0 0 0 0 2505 862 // $ nvidia-smi dmon -s puc # gpu pwr temp sm mem enc dec mclk pclk # Idx W C % % % % MHz MHz 0 146 72 100 53 0 0 2505 823 0 144 73 100 81 0 0 2505 875 0 148 72 99 47 0 0 2505 784 0 149 73 100 75 0 0 2505 862 10 . 12
②学習遅いなと思ったら ②学習遅いなと思ったら GPU 使用率を確認する tf.data.Dataset を使うことを検討する I/Oや前処理を非同期でやってくれる を確認する Performance Guide
10 . 13
③AIの期待値高すぎ問題 ③AIの期待値高すぎ問題 10 . 14
③AIの期待値高すぎ問題 ③AIの期待値高すぎ問題 推論で間違えるパターン 推論で間違えるパターン NG NG 園児、先生以外が写っているので✕ NG NG 一部ボケているので✕
OK OK ボケているが園児は ピンと合っているので◦ S ※実際の写真を使っているため公開用の資料ではぼかしています 10 . 15
AIへの期待値コントロールも AIへの期待値コントロールも 忘れずに 忘れずに 10 . 16
実際にやってみて 実際にやってみて 準備・学習を含めてとにかく時間がかかる 通常開発と比べると成果物が不透明だがおもしろい エンジニア目線から見て深層学習もはじめやすい 10 . 17
Let's get started deep learning! Let's get started deep learning!
10 . 18
ありがとうございました ありがとうございました 11
質問ありますか? 質問ありますか? 12