fix(face-landmarks): get face models from node_modules instead of having resoruces folder (#11326)
This commit is contained in:
parent
9bcc5896ba
commit
856ef757d4
7
Makefile
7
Makefile
|
@ -8,7 +8,7 @@ TF_WASM_DIR = node_modules/@tensorflow/tfjs-backend-wasm/dist/
|
||||||
RNNOISE_WASM_DIR = node_modules/rnnoise-wasm/dist
|
RNNOISE_WASM_DIR = node_modules/rnnoise-wasm/dist
|
||||||
TFLITE_WASM = react/features/stream-effects/virtual-background/vendor/tflite
|
TFLITE_WASM = react/features/stream-effects/virtual-background/vendor/tflite
|
||||||
MEET_MODELS_DIR = react/features/stream-effects/virtual-background/vendor/models
|
MEET_MODELS_DIR = react/features/stream-effects/virtual-background/vendor/models
|
||||||
FACE_MODELS_DIR = react/features/face-landmarks/resources
|
FACE_MODELS_DIR = node_modules/@vladmandic/face-api/model
|
||||||
NODE_SASS = ./node_modules/.bin/sass
|
NODE_SASS = ./node_modules/.bin/sass
|
||||||
NPM = npm
|
NPM = npm
|
||||||
OUTPUT_DIR = .
|
OUTPUT_DIR = .
|
||||||
|
@ -103,7 +103,10 @@ deploy-meet-models:
|
||||||
|
|
||||||
deploy-face-landmarks:
|
deploy-face-landmarks:
|
||||||
cp \
|
cp \
|
||||||
$(FACE_MODELS_DIR)/* \
|
$(FACE_MODELS_DIR)/tiny_face_detector_model-weights_manifest.json \
|
||||||
|
$(FACE_MODELS_DIR)/tiny_face_detector_model.bin \
|
||||||
|
$(FACE_MODELS_DIR)/face_expression_model-weights_manifest.json \
|
||||||
|
$(FACE_MODELS_DIR)/face_expression_model.bin \
|
||||||
$(DEPLOY_DIR)
|
$(DEPLOY_DIR)
|
||||||
|
|
||||||
deploy-css:
|
deploy-css:
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
# Face Landmarks Detection and Face Expression Models and Weights
|
|
||||||
|
|
||||||
### Tiny Face Detector
|
|
||||||
|
|
||||||
It is a realtime face detector.
|
|
||||||
|
|
||||||
### Face Expression Recognition Model
|
|
||||||
|
|
||||||
It is a models that recognizes face expressions.
|
|
||||||
|
|
||||||
### Usage
|
|
||||||
|
|
||||||
Both models are loaded using face-api which is as AI-powered Face Detection & Rotation Tracking, Face Description & Recognition, Age & Gender & Emotion Prediction for Browser and NodeJS using TensorFlow/JS.
|
|
||||||
|
|
||||||
Depending on the browser and hardware acceleration available the tensorflow.js will use a webgl backend of a cpu backend.
|
|
||||||
|
|
||||||
## LICENSE
|
|
||||||
|
|
||||||
The models were both downloaded from the face-api repository, https://github.com/vladmandic/face-api , and they can be found in this folder https://github.com/vladmandic/face-api/tree/master/model.
|
|
||||||
|
|
||||||
The repository has a MIT License. More information can be found here https://github.com/vladmandic/face-api/blob/master/LICENSE.
|
|
|
@ -1,60 +0,0 @@
|
||||||
[
|
|
||||||
{
|
|
||||||
"weights":
|
|
||||||
[
|
|
||||||
{"name":"dense0/conv0/filters","shape":[3,3,3,32],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.0057930146946626555,"min":-0.7125408074435067}},
|
|
||||||
{"name":"dense0/conv0/bias","shape":[32],"dtype":"float32"},
|
|
||||||
{"name":"dense0/conv1/depthwise_filter","shape":[3,3,32,1],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.006473719839956246,"min":-0.6408982641556684}},
|
|
||||||
{"name":"dense0/conv1/pointwise_filter","shape":[1,1,32,32],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.010509579321917366,"min":-1.408283629136927}},
|
|
||||||
{"name":"dense0/conv1/bias","shape":[32],"dtype":"float32"},
|
|
||||||
{"name":"dense0/conv2/depthwise_filter","shape":[3,3,32,1],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.005666389652326995,"min":-0.7252978754978554}},
|
|
||||||
{"name":"dense0/conv2/pointwise_filter","shape":[1,1,32,32],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.010316079270605948,"min":-1.1760330368490781}},
|
|
||||||
{"name":"dense0/conv2/bias","shape":[32],"dtype":"float32"},
|
|
||||||
{"name":"dense0/conv3/depthwise_filter","shape":[3,3,32,1],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.0063220320963392074,"min":-0.853474333005793}},
|
|
||||||
{"name":"dense0/conv3/pointwise_filter","shape":[1,1,32,32],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.010322785377502442,"min":-1.4658355236053466}},
|
|
||||||
{"name":"dense0/conv3/bias","shape":[32],"dtype":"float32"},
|
|
||||||
{"name":"dense1/conv0/depthwise_filter","shape":[3,3,32,1],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.0042531527724920535,"min":-0.5741756242864272}},
|
|
||||||
{"name":"dense1/conv0/pointwise_filter","shape":[1,1,32,64],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.010653339647779278,"min":-1.1825207009035}},
|
|
||||||
{"name":"dense1/conv0/bias","shape":[64],"dtype":"float32"},
|
|
||||||
{"name":"dense1/conv1/depthwise_filter","shape":[3,3,64,1],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.005166931012097527,"min":-0.6355325144879957}},
|
|
||||||
{"name":"dense1/conv1/pointwise_filter","shape":[1,1,64,64],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.011478300188101974,"min":-1.3888743227603388}},
|
|
||||||
{"name":"dense1/conv1/bias","shape":[64],"dtype":"float32"},
|
|
||||||
{"name":"dense1/conv2/depthwise_filter","shape":[3,3,64,1],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.006144821410085641,"min":-0.8479853545918185}},
|
|
||||||
{"name":"dense1/conv2/pointwise_filter","shape":[1,1,64,64],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.010541967317169788,"min":-1.3809977185492421}},
|
|
||||||
{"name":"dense1/conv2/bias","shape":[64],"dtype":"float32"},
|
|
||||||
{"name":"dense1/conv3/depthwise_filter","shape":[3,3,64,1],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.005769844849904378,"min":-0.686611537138621}},
|
|
||||||
{"name":"dense1/conv3/pointwise_filter","shape":[1,1,64,64],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.010939095534530341,"min":-1.2689350820055196}},
|
|
||||||
{"name":"dense1/conv3/bias","shape":[64],"dtype":"float32"},
|
|
||||||
{"name":"dense2/conv0/depthwise_filter","shape":[3,3,64,1],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.0037769308277204924,"min":-0.40790852939381317}},
|
|
||||||
{"name":"dense2/conv0/pointwise_filter","shape":[1,1,64,128],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.01188667194516051,"min":-1.4382873053644218}},
|
|
||||||
{"name":"dense2/conv0/bias","shape":[128],"dtype":"float32"},
|
|
||||||
{"name":"dense2/conv1/depthwise_filter","shape":[3,3,128,1],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.006497045825509464,"min":-0.8381189114907208}},
|
|
||||||
{"name":"dense2/conv1/pointwise_filter","shape":[1,1,128,128],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.011632198913424622,"min":-1.3377028750438316}},
|
|
||||||
{"name":"dense2/conv1/bias","shape":[128],"dtype":"float32"},
|
|
||||||
{"name":"dense2/conv2/depthwise_filter","shape":[3,3,128,1],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.005947182225246056,"min":-0.7969224181829715}},
|
|
||||||
{"name":"dense2/conv2/pointwise_filter","shape":[1,1,128,128],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.011436844339557722,"min":-1.4524792311238306}},
|
|
||||||
{"name":"dense2/conv2/bias","shape":[128],"dtype":"float32"},
|
|
||||||
{"name":"dense2/conv3/depthwise_filter","shape":[3,3,128,1],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.006665432686899222,"min":-0.8998334127313949}},
|
|
||||||
{"name":"dense2/conv3/pointwise_filter","shape":[1,1,128,128],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.01283421422920975,"min":-1.642779421338848}},
|
|
||||||
{"name":"dense2/conv3/bias","shape":[128],"dtype":"float32"},
|
|
||||||
{"name":"dense3/conv0/depthwise_filter","shape":[3,3,128,1],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.004711699953266218,"min":-0.6737730933170692}},
|
|
||||||
{"name":"dense3/conv0/pointwise_filter","shape":[1,1,128,256],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.010955964817720302,"min":-1.3914075318504784}},
|
|
||||||
{"name":"dense3/conv0/bias","shape":[256],"dtype":"float32"},
|
|
||||||
{"name":"dense3/conv1/depthwise_filter","shape":[3,3,256,1],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.00554193468654857,"min":-0.7149095745647656}},
|
|
||||||
{"name":"dense3/conv1/pointwise_filter","shape":[1,1,256,256],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.016790372250126858,"min":-2.484975093018775}},
|
|
||||||
{"name":"dense3/conv1/bias","shape":[256],"dtype":"float32"},
|
|
||||||
{"name":"dense3/conv2/depthwise_filter","shape":[3,3,256,1],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.006361540626077091,"min":-0.8142772001378676}},
|
|
||||||
{"name":"dense3/conv2/pointwise_filter","shape":[1,1,256,256],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.01777329678628959,"min":-1.7062364914838006}},
|
|
||||||
{"name":"dense3/conv2/bias","shape":[256],"dtype":"float32"},
|
|
||||||
{"name":"dense3/conv3/depthwise_filter","shape":[3,3,256,1],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.006900275922289082,"min":-0.8625344902861353}},
|
|
||||||
{"name":"dense3/conv3/pointwise_filter","shape":[1,1,256,256],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.015449936717164282,"min":-1.9003422162112067}},
|
|
||||||
{"name":"dense3/conv3/bias","shape":[256],"dtype":"float32"},
|
|
||||||
{"name":"fc/weights","shape":[256,7],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.004834276554631252,"min":-0.7203072066400565}},
|
|
||||||
{"name":"fc/bias","shape":[7],"dtype":"float32"}
|
|
||||||
],
|
|
||||||
"paths":
|
|
||||||
[
|
|
||||||
"face_expression_model.bin"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
Binary file not shown.
|
@ -1,30 +0,0 @@
|
||||||
[
|
|
||||||
{
|
|
||||||
"weights":
|
|
||||||
[
|
|
||||||
{"name":"conv0/filters","shape":[3,3,3,16],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.009007044399485869,"min":-1.2069439495311063}},
|
|
||||||
{"name":"conv0/bias","shape":[16],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.005263455241334205,"min":-0.9211046672334858}},
|
|
||||||
{"name":"conv1/depthwise_filter","shape":[3,3,16,1],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.004001977630690033,"min":-0.5042491814669441}},
|
|
||||||
{"name":"conv1/pointwise_filter","shape":[1,1,16,32],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.013836609615999109,"min":-1.411334180831909}},
|
|
||||||
{"name":"conv1/bias","shape":[32],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.0015159862590771096,"min":-0.30926119685173037}},
|
|
||||||
{"name":"conv2/depthwise_filter","shape":[3,3,32,1],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.002666276225856706,"min":-0.317286870876948}},
|
|
||||||
{"name":"conv2/pointwise_filter","shape":[1,1,32,64],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.015265831292844286,"min":-1.6792414422128714}},
|
|
||||||
{"name":"conv2/bias","shape":[64],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.0020280554598453,"min":-0.37113414915168985}},
|
|
||||||
{"name":"conv3/depthwise_filter","shape":[3,3,64,1],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.006100742489683862,"min":-0.8907084034938438}},
|
|
||||||
{"name":"conv3/pointwise_filter","shape":[1,1,64,128],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.016276211832083907,"min":-2.0508026908425725}},
|
|
||||||
{"name":"conv3/bias","shape":[128],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.003394414279975143,"min":-0.7637432129944072}},
|
|
||||||
{"name":"conv4/depthwise_filter","shape":[3,3,128,1],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.006716050119961009,"min":-0.8059260143953211}},
|
|
||||||
{"name":"conv4/pointwise_filter","shape":[1,1,128,256],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.021875603993733724,"min":-2.8875797271728514}},
|
|
||||||
{"name":"conv4/bias","shape":[256],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.0041141652009066415,"min":-0.8187188749804216}},
|
|
||||||
{"name":"conv5/depthwise_filter","shape":[3,3,256,1],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.008423839597141042,"min":-0.9013508368940915}},
|
|
||||||
{"name":"conv5/pointwise_filter","shape":[1,1,256,512],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.030007277283014035,"min":-3.8709387695088107}},
|
|
||||||
{"name":"conv5/bias","shape":[512],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.008402082966823203,"min":-1.4871686851277068}},
|
|
||||||
{"name":"conv8/filters","shape":[1,1,512,25],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.028336129469030042,"min":-4.675461362389957}},
|
|
||||||
{"name":"conv8/bias","shape":[25],"dtype":"float32","quantization":{"dtype":"uint8","scale":0.002268134028303857,"min":-0.41053225912299807}}
|
|
||||||
],
|
|
||||||
"paths":
|
|
||||||
[
|
|
||||||
"tiny_face_detector_model.bin"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
Binary file not shown.
|
@ -9800,7 +9800,8 @@
|
||||||
"version": "5.1.0",
|
"version": "5.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.1.0.tgz",
|
||||||
"integrity": "sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw==",
|
"integrity": "sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw==",
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"requires": {}
|
||||||
},
|
},
|
||||||
"acorn-walk": {
|
"acorn-walk": {
|
||||||
"version": "6.2.0",
|
"version": "6.2.0",
|
||||||
|
@ -9824,13 +9825,15 @@
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz",
|
||||||
"integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==",
|
"integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==",
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"requires": {}
|
||||||
},
|
},
|
||||||
"ajv-keywords": {
|
"ajv-keywords": {
|
||||||
"version": "3.4.1",
|
"version": "3.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.1.tgz",
|
||||||
"integrity": "sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ==",
|
"integrity": "sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ==",
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"requires": {}
|
||||||
},
|
},
|
||||||
"ansi-escapes": {
|
"ansi-escapes": {
|
||||||
"version": "3.2.0",
|
"version": "3.2.0",
|
||||||
|
@ -11382,7 +11385,8 @@
|
||||||
"version": "git+ssh://git@github.com/jitsi/eslint-config-jitsi.git#f292fbc07689eb3dbeb81c074accff25b448b074",
|
"version": "git+ssh://git@github.com/jitsi/eslint-config-jitsi.git#f292fbc07689eb3dbeb81c074accff25b448b074",
|
||||||
"integrity": "sha512-kBrBgI96QBKg4hG633q0zeYZBWT8T79vTGoHuy3TapKrTG/1y6IneRXQ9+NKoTdCY+zQ6A4xc6D29iJKc6dVMQ==",
|
"integrity": "sha512-kBrBgI96QBKg4hG633q0zeYZBWT8T79vTGoHuy3TapKrTG/1y6IneRXQ9+NKoTdCY+zQ6A4xc6D29iJKc6dVMQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"from": "eslint-config-jitsi@github:jitsi/eslint-config-jitsi#1.0.3"
|
"from": "eslint-config-jitsi@github:jitsi/eslint-config-jitsi#1.0.3",
|
||||||
|
"requires": {}
|
||||||
},
|
},
|
||||||
"eslint-import-resolver-node": {
|
"eslint-import-resolver-node": {
|
||||||
"version": "0.3.4",
|
"version": "0.3.4",
|
||||||
|
@ -11677,7 +11681,8 @@
|
||||||
"version": "0.7.5",
|
"version": "0.7.5",
|
||||||
"resolved": "https://registry.npmjs.org/expose-loader/-/expose-loader-0.7.5.tgz",
|
"resolved": "https://registry.npmjs.org/expose-loader/-/expose-loader-0.7.5.tgz",
|
||||||
"integrity": "sha512-iPowgKUZkTPX5PznYsmifVj9Bob0w2wTHVkt/eYNPSzyebkUgIedmskf/kcfEIWpiWjg3JRjnW+a17XypySMuw==",
|
"integrity": "sha512-iPowgKUZkTPX5PznYsmifVj9Bob0w2wTHVkt/eYNPSzyebkUgIedmskf/kcfEIWpiWjg3JRjnW+a17XypySMuw==",
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"requires": {}
|
||||||
},
|
},
|
||||||
"express": {
|
"express": {
|
||||||
"version": "4.17.1",
|
"version": "4.17.1",
|
||||||
|
|
Loading…
Reference in New Issue