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
face-api.js で璃奈ちゃんボードを作ってみたよ
Search
rch850
January 25, 2020
Programming
630
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
face-api.js で璃奈ちゃんボードを作ってみたよ
rch850
January 25, 2020
More Decks by rch850
See All by rch850
推しのウェブ技術 〜2026年夏〜 Declarative Partial Updates
rch850
0
83
Security Hub と出会ってから 1年半が過ぎました
rch850
1
480
#2022年に学んで良かった技術
rch850
0
1.3k
いい感じにスピードアップするコンテストの紹介
rch850
0
480
†2020年に建つ墓標達†
rch850
0
140
大掃除中の困ったを解決しようとした話
rch850
0
500
もしかして頻尿
rch850
0
87
SVGのよさみを語る会
rch850
0
170
俺の git-review
rch850
0
170
Other Decks in Programming
See All in Programming
私なりのハーネスエンジニアリング ~独自の言語処理系の開発を通して~
seosoft
0
200
動画プレイヤーはなぜカクつくのか 〜Flutterのレンダリングとネイティブの境界を解剖する〜
naruogram
0
330
graphql-ruby を Spinel で速くしようとした話
mtsmfm
0
140
学びを記事・スライド・Xへ高速展開する― AI-assisted Learning Loopで回すコンテンツ生成術
ochtum
0
200
flutter_test のその先へ — Flutter アプリの LLM 機能に「評価」という品質保証を
kosukesaigusa
0
200
느린 네트워크와 저사양 디바이스 사용자를 위한 웹뷰 로딩 시간 개선기
kmkim
1
220
AI時代のIaC入門 〜なぜインフラをコードで管理したいのか?〜 / Introduction to IaC in the AI Era
akihisaikeda
6
1.5k
Spec-driven Development with AI
simas
PRO
0
2.3k
Будущее локальных LLM – Алексей Голобурдин, PythoNN
sobolevn
0
120
Zero-Tap Sign-In対応、結局何をすればいいの?
mitohato14
0
2k
エージェントを使い続けるためのメタワーク / Meta-work for keeping using the agent
rkaga
6
2.3k
Claude Code ハーネスDeep Dive – 君はどこまで制御する? -
takateeen_knj
6
5k
Featured
See All Featured
Six Lessons from altMBA
skipperchong
29
4.6k
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
480
Skip the Path - Find Your Career Trail
mkilby
1
290
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.8k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.9k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Abbi's Birthday
coloredviolet
4
11k
Statistics for Hackers
jakevdp
799
230k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
400
Why Our Code Smells
bkeepers
PRO
340
58k
Transcript
face-api.jsで 璃奈ちゃんボードを 作ってみたよ ふくもく会 その60 2020-01-25 @rch850
自己紹介 • りちゃ @rch850 です • 鯖江ではたらくエンジニアです • 最近見た映画はメイドインアビス
face-api.jsで 璃奈ちゃんボードを 作ってみたよ
face-api.js • https://github.com/justadudewhohacks/face-api.js/ • 顔の検出、認識ライブラリ (js) • ブラウザやサーバで動く • tensorflow.js
ベース
表情認識
機械学習なので • 類似品の clmtrackr との大きな違い • Mobilenet とか、知ってる人は知っている単語が出てくる • 使うネットワークに応じたモデルを読み込む必要がある
機械学習なので • モデルが要るってことは学習しなきゃだめ? • いろんな表情の写真を自分で撮り続けるのしんどい • これは clmtrackr に戻るしかないのか? •
モデルどっかにないの?
あるよ • 学習済みモデルがあります • face-api.js-models https://github.com/justadudewhohacks/face-api.js- models • 欧米系の顔じゃなきゃだめかと思ったけど、そうでもない
face-api.jsで 璃奈ちゃんボードを 作ってみたよ
璃奈ちゃんボードとは • 感情を表すのが苦手な天王寺璃奈ちゃんが、感情を表すため に使っているボード • 手書きだったり、デジタルだったりする •
face-api.jsで 璃奈ちゃんボードを 作ってみたよ
作ってみたよ • 動くやつ https://t68cv.csb.app/ • ソースコード https://codesandbox.io/s/face-api- rinachanboard-t68cv
モデルの読み込み faceapi.nets.faceExpressionNet .loadFromUri( "https://raw.githubusercontent.com/justadudewhohacks/face-api.js-models/master/face_expression/ face_expression_model-weights_manifest.json" ) .catch(err => console.log(err)); faceapi.nets.ssdMobilenetv1
.loadFromUri( "https://raw.githubusercontent.com/justadudewhohacks/face-api.js-models/master/ssd_mobilenetv1/ ssd_mobilenetv1_model-weights_manifest.json" ) .catch(err => console.error(err)); face-api.js-models というリポジトリがあって、そこに学習済みのモデルデータがある https://github.com/justadudewhohacks/face-api.js-models
表情検出 const result = await faceapi.detectSingleFace(video).withFaceExpressions(); const sortedArray = result.expressions.asSortedArray();
if (sortedArray[0].probability >= 0.5) { boardId = BoardExpressionMap[sortedArray[0].expression]; draw(RinaChanBoard[boardId]); } { "neutral": 0.9997411370277405, "happy": 0.00003564624421414919, "sad": 0.00003119324901490472, "angry": 0.0000033359387998643797, "fearful": 2.859609660177398e-9, "disgusted": 4.6088089789009246e-8, "surprised": 0.00018857289978768677 }
これから •表情を増やしたい →スクショを撮り続ける日々 •ちゃんと公開したい