$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
ディープラーニング素人がPyTorchでマスクつけている人を学習させてみた
Search
KMiura
February 20, 2021
Technology
0
950
ディープラーニング素人がPyTorchでマスクつけている人を学習させてみた
2021.02.20「Python Charity Talks in Japan 2021.02」
https://pyconjp.connpass.com/event/199787/
KMiura
February 20, 2021
Tweet
Share
More Decks by KMiura
See All by KMiura
運用しているアプリケーションのDBのリプレイスをやってみた
miura55
1
1.1k
Amazon Rekognitionを使ったインターホンハック
miura55
0
95
Pythonでルンバをハックしてみた
miura55
0
180
あなたの知らないクラフトビールの世界
miura55
0
370
Storage Browser for Amazon S3を触ってみた + α
miura55
0
230
Cloudflare R2をトリガーにCloudflare Workersを動かしてみた
miura55
0
230
あのボタンでつながるSORACOM
miura55
0
150
Postman Flowsで作るAPI連携LINE Bot
miura55
0
390
Lambdaと共に歩んだAWS
miura55
3
870
Other Decks in Technology
See All in Technology
チーリンについて
hirotomotaguchi
6
2.1k
MySQLとPostgreSQLのコレーション / Collation of MySQL and PostgreSQL
tmtms
1
840
Lessons from Migrating to OpenSearch: Shard Design, Log Ingestion, and UI Decisions
sansantech
PRO
1
150
Amazon Bedrock Knowledge Bases × メタデータ活用で実現する検証可能な RAG 設計
tomoaki25
2
180
AlmaLinux + KVM + Cockpit で始めるお手軽仮想化基盤 ~ 開発環境などでの利用を想定して ~
koedoyoshida
0
110
打 造 A I 驅 動 的 G i t H u b ⾃ 動 化 ⼯ 作 流 程
appleboy
0
360
ハッカソンから社内プロダクトへ AIエージェント「ko☆shi」開発で学んだ4つの重要要素
sonoda_mj
4
190
AWS re:Invent 2025で見たGrafana最新機能の紹介
hamadakoji
0
420
Identity Management for Agentic AI 解説
fujie
0
110
Kiro を用いたペアプロのススメ
taikis
1
220
コンテキスト情報を活用し個社最適化されたAI Agentを実現する4つのポイント
kworkdev
PRO
1
1.6k
AI-DLCを現場にインストールしてみた:プロトタイプ開発で分かったこと・やめたこと
recruitengineers
PRO
2
160
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
How to train your dragon (web standard)
notwaldorf
97
6.4k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.8k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Designing for humans not robots
tammielis
254
26k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.1k
How to Ace a Technical Interview
jacobian
281
24k
Navigating Team Friction
lara
191
16k
We Have a Design System, Now What?
morganepeng
54
7.9k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.6k
Transcript
ディープラーニング素人がPyTorchで マスクつけている人を学習させてみた KMiura(@k_miura_io)
お前だれよ • 三浦 耕生(こうき) • 名古屋のゲーム会社 のサーバーエンジニア @k_miura_io koki.miura05
ディープラーニング • ディープラーニングはチュートリアル 止まり • せっかくGPU乗ったSurface買ったの に…(3年前) • Pythonやってるならディープラーニ ングやらないと
ディープラーニングを社会の役に立てたい (建前) • 外出するのにマスクを付けるのは当 たり前 • 百貨店行くとマスクつけても認識する サーモカメラを見かけるようになった • ワイも実装してドヤりたい(本音)
実行環境 • Python 3.9 • Pytorch(Tensorflowはベタすぎる) • NVIDIA GeForce GTX
965M(Surface Book内蔵GPU)
とりあえず動かしてみた • Mobile Net V2を転移学習 • データ数600枚ほど • 思ってたのと違う…
Why? • 逆伝搬の計算するとトレーニングをするたびに以前の勾配を加算する • トレーニングの度に勾配をゼロにする処理をいれてみた • ついでにデータも増やしたれ(各クラス600枚→900枚)
学習結果 • 悪くはないがノイズ結構のってる • Accuracyが1に到達してるものもある(収束しているのが理想)
さらに改善 • もっとデータ量を増やしてみた(各クラス900枚→1600枚) • ついでにエポック数増やしてみる(100エポック→150エポック)
学習結果 • 目立ったノイズも無くきれいな曲線(ディープラーニングでよくあるやつ) • Accuracyが1に到達せず収束している • やはりデータがものをいう
実験成果 https://youtu.be/VbBSG1Is3hY
まとめ • ディープラーニングはデータ量、アルゴリズムは二の次 • ようやくGPUを生かすことができた(Jetson Nanoも買える) • ディープラーニング完全に理解した
今回のソースコード&ブログ https://github.com/Miura55/deeplearning- face-mask-detection https://supernove.hatenadiary.jp/entry/ 2021/01/19/041445
END