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
74
Security Hub と出会ってから 1年半が過ぎました
rch850
1
440
#2022年に学んで良かった技術
rch850
0
1.3k
いい感じにスピードアップするコンテストの紹介
rch850
0
480
†2020年に建つ墓標達†
rch850
0
130
大掃除中の困ったを解決しようとした話
rch850
0
500
もしかして頻尿
rch850
0
82
SVGのよさみを語る会
rch850
0
160
俺の git-review
rch850
0
160
Other Decks in Programming
See All in Programming
UnityでSystem.Net.WebSocketsなWebSocketサーバが動かないのでUnity Monoのコードを覗いてみた / about implementing websocket server with unity mono
drumath2237
1
550
Embedded Swiftで作る自作USBデバイス によるiOSデバイスの自動テスト / iOSDC Japan 2026 glassfiber
glassfiber
0
300
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
2
1.5k
KiroのSpecで「五目並べ」を作ってみる
satoshi256kbyte
1
350
なぜCTOを降りてFDEを選んだのか?〜なぜプロダクト企業がFDEで顧客の現場に踏み込むのか〜
gonta
1
160
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
140
見えないものを探る要求要件定義に必要な基本的思考 / invisible-requirement-thinking
minodriven
15
6.9k
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
150
UPDATE をやめる — EF Core でマスタをバージョン管理する
panda728
PRO
0
1.1k
GitHubハンズオン講座 — 実務レベルのチーム開発のフローを身につけよう
junhat6
0
120
速く作れる。その次は、速く確かめられる開発へ 〜AIネイティブ開発を支える、Shift Down〜 / Can build fast. Next, moving to development where we can verify fast.
rkaga
8
5.5k
そのリトライ、死んだコネクションを使い回していませんか ── GoのHTTPクライアントとHTTP/2を実プロダクト障害から学び直す
myus4a
0
390
Featured
See All Featured
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
300
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
570
The Art of Programming - Codeland 2020
erikaheidi
57
14k
The Curse of the Amulet
leimatthew05
3
15k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
350
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
860
Deep Space Network (abreviated)
tonyrice
0
360
StorybookのUI Testing Handbookを読んだ
zakiyama
31
7k
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
300
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
310
Code Review Best Practice
trishagee
74
20k
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 }
これから •表情を増やしたい →スクショを撮り続ける日々 •ちゃんと公開したい