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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
73
Security Hub と出会ってから 1年半が過ぎました
rch850
1
440
#2022年に学んで良かった技術
rch850
0
1.3k
いい感じにスピードアップするコンテストの紹介
rch850
0
470
†2020年に建つ墓標達†
rch850
0
130
大掃除中の困ったを解決しようとした話
rch850
0
500
もしかして頻尿
rch850
0
80
SVGのよさみを語る会
rch850
0
160
俺の git-review
rch850
0
160
Other Decks in Programming
See All in Programming
AI が書く Go コードの品質を劇的に向上させる Linter: “declscope”
mpyw
0
440
テストを司るデーモンに会いに行く 〜隔離した仮想マシンでテストを通すまで〜
h1d3mun3
1
580
そのリトライ、死んだコネクションを使い回していませんか ── GoのHTTPクライアントとHTTP/2を実プロダクト障害から学び直す
myus4a
0
280
thread_parallel_with_free-threaded_Python_and_NumPy.pdf
riku_sakamoto
0
360
AI活用は、個人から組織へ|マルチプレイヤーエージェントハーネス「QM」の社内活用事例 / AI use is moving from individuals to orgs
rkaga
1
270
スマート反転とウェブアクセシビリティ
camiha
0
210
MVNOの申込からeSIM開通までをiOSアプリでつなぐ- 本人確認・MNP・通信事業者基盤をまたぐ実装
satotakeshi
0
490
大喜利で理解するLLM as a Judge / Understanding LLM-as-a-Judge through Ogiri
rockname
0
170
選挙速報を多くのユーザーへ 届ける Live Activities 設計
hamayokokuririn
0
180
iOSDC Japan 2026 - Swiftで作って学ぼう!データベース自作入門
kaseken
2
370
Agents on Rails - Rails at Scale 2026
irinanazarova
0
270
MCP Appsでつくるチャット駆動な地図アプリ
nakamori1024
0
110
Featured
See All Featured
WCS-LA-2024
lcolladotor
0
830
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
850
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.6k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
330
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
340
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
740
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
880
Game over? The fight for quality and originality in the time of robots
wayneb77
1
290
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
GitHub's CSS Performance
jonrohan
1033
470k
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 }
これから •表情を増やしたい →スクショを撮り続ける日々 •ちゃんと公開したい