fix node build and update model signatures

pull/293/head
Vladimir Mandic 2021-05-11 07:53:06 -04:00
parent 73011c6a06
commit 1652300288
8 changed files with 63 additions and 38 deletions

View File

@ -1,6 +1,6 @@
# @vladmandic/human
Version: **1.8.3**
Version: **1.8.4**
Description: **Human: AI-powered 3D Face Detection & Rotation Tracking, Face Description & Recognition, Body Pose Tracking, 3D Hand & Finger Tracking, Iris Analysis, Age & Gender & Emotion Prediction, Gesture Recognition**
Author: **Vladimir Mandic <mandic00@live.com>**
@ -9,11 +9,15 @@ Repository: **<git+https://github.com/vladmandic/human.git>**
## Changelog
### **1.8.4** 2021/05/11 mandic00@live.com
### **origin/main** 2021/05/05 mandic00@live.com
### **1.8.3** 2021/05/05 mandic00@live.com
### **origin/main** 2021/05/04 mandic00@live.com
- switch posenet weights
### **1.8.2** 2021/05/04 mandic00@live.com

View File

@ -24,6 +24,7 @@ onmessage = async (msg) => {
}
// must strip canvas from return value as it cannot be transfered from worker thread
if (result.canvas) result.canvas = null;
// @ts-ignore tslint wrong type matching for worker
postMessage({ result });
busy = false;
};

View File

@ -4,11 +4,18 @@
"convertedBy": "https://github.com/vladmandic",
"userDefinedMetadata":
{
"signature":
"signature":
{
"inputs":
{
"inputs": {"input:0":{"name":"input:0","dtype":"DT_FLOAT","tensorShape":{"dim":[{"size":"1"},{"size":"256"},{"size":"256"},{"size":"3"}]}}},
"outputs": {"Identity_3:0":{"name":"Identity_3:0","dtype":"DT_FLOAT","tensorShape":{"dim":[{"size":"1"},{"size":"384"},{"size":"16"}]}},"Identity:0":{"name":"Identity:0","dtype":"DT_FLOAT","tensorShape":{"dim":[{"size":"1"},{"size":"512"},{"size":"1"}]}},"Identity_1:0":{"name":"Identity_1:0","dtype":"DT_FLOAT","tensorShape":{"dim":[{"size":"1"},{"size":"384"},{"size":"1"}]}},"Identity_2:0":{"name":"Identity_2:0","dtype":"DT_FLOAT","tensorShape":{"dim":[{"size":"1"},{"size":"512"},{"size":"16"}]}}}
"input:0":{"name":"input:0","dtype":"DT_FLOAT","tensorShape":{"dim":[{"size":"1"},{"size":"256"},{"size":"256"},{"size":"3"}]}}
},
"outputs":
{
"Identity_3:0":{"name":"Identity_3:0","dtype":"DT_FLOAT","tensorShape":{"dim":[{"size":"1"},{"size":"384"},{"size":"16"}]}},"Identity:0":{"name":"Identity:0","dtype":"DT_FLOAT","tensorShape":{"dim":[{"size":"1"},{"size":"512"},{"size":"1"}]}},
"Identity_1:0":{"name":"Identity_1:0","dtype":"DT_FLOAT","tensorShape":{"dim":[{"size":"1"},{"size":"384"},{"size":"1"}]}},"Identity_2:0":{"name":"Identity_2:0","dtype":"DT_FLOAT","tensorShape":{"dim":[{"size":"1"},{"size":"512"},{"size":"16"}]}}
}
}
},
"modelTopology":
{
@ -273,10 +280,7 @@
{"name":"Identity_1","op":"Identity","input":["StatefulPartitionedCall/functional_1/tf_op_layer_classificators_2/classificators_2"],"attr":{"T":{"type":"DT_FLOAT"}}}
],
"library": {},
"versions":
{
"producer": 440
}
"versions": {}
},
"weightsManifest":
[

View File

@ -4,11 +4,17 @@
"convertedBy": "https://github.com/vladmandic",
"userDefinedMetadata":
{
"signature":
"signature":
{
"inputs":
{
"inputs": {"input_1:0":{"name":"input_1:0","dtype":"DT_FLOAT","tensorShape":{"dim":[{"size":"-1"},{"size":"64"},{"size":"64"},{"size":"1"}]}}},
"outputs": {"Identity:0":{"name":"Identity:0","dtype":"DT_FLOAT","tensorShape":{"dim":[{"size":"-1"},{"size":"7"}]}}}
"input_1:0":{"name":"input_1:0","dtype":"DT_FLOAT","tensorShape":{"dim":[{"size":"-1"},{"size":"64"},{"size":"64"},{"size":"1"}]}}
},
"outputs":
{
"Identity:0":{"name":"Identity:0","dtype":"DT_FLOAT","tensorShape":{"dim":[{"size":"-1"},{"size":"7"}]}}
}
}
},
"modelTopology":
{
@ -61,10 +67,7 @@
{"name":"Identity","op":"Identity","input":["StatefulPartitionedCall/model_1/predictions/Softmax"],"attr":{"T":{"type":"DT_FLOAT"}}}
],
"library": {},
"versions":
{
"producer": 440
}
"versions": {}
},
"weightsManifest":
[

View File

@ -4,11 +4,19 @@
"convertedBy": "https://github.com/vladmandic",
"userDefinedMetadata":
{
"signature":
"signature":
{
"inputs":
{
"inputs": {"input_1:0":{"name":"input_1:0","dtype":"DT_FLOAT","tensorShape":{"dim":[{"size":"1"},{"size":"192"},{"size":"192"},{"size":"3"}]}}},
"outputs": {"Identity_1:0":{"name":"Identity_1:0","dtype":"DT_FLOAT","tensorShape":{"dim":[{"size":"1"},{"size":"266"}]}},"Identity_2:0":{"name":"Identity_2:0","dtype":"DT_FLOAT","tensorShape":{"dim":[{"size":"1"},{"size":"1"}]}},"Identity:0":{"name":"Identity:0","dtype":"DT_FLOAT","tensorShape":{"dim":[{"size":"1"},{"size":"1404"}]}}}
"input_1:0":{"name":"input_1:0","dtype":"DT_FLOAT","tensorShape":{"dim":[{"size":"1"},{"size":"192"},{"size":"192"},{"size":"3"}]}}
},
"outputs":
{
"Identity_1:0":{"name":"Identity_1:0","dtype":"DT_FLOAT","tensorShape":{"dim":[{"size":"1"},{"size":"266"}]}},
"Identity_2:0":{"name":"Identity_2:0","dtype":"DT_FLOAT","tensorShape":{"dim":[{"size":"1"},{"size":"1"}]}},
"Identity:0":{"name":"Identity:0","dtype":"DT_FLOAT","tensorShape":{"dim":[{"size":"1"},{"size":"1404"}]}}
}
}
},
"modelTopology":
{
@ -253,10 +261,8 @@
{"name":"Identity","op":"Identity","input":["StatefulPartitionedCall/model/output_mesh/Reshape","^Func/StatefulPartitionedCall/output_control_node/_204"],"attr":{"T":{"type":"DT_FLOAT"}}},
{"name":"Identity_1","op":"Identity","input":["StatefulPartitionedCall/model/output_contours/Reshape","^Func/StatefulPartitionedCall/output_control_node/_204"],"attr":{"T":{"type":"DT_FLOAT"}}}
],
"versions":
{
"producer": 134
}
"library": {},
"versions": {}
},
"weightsManifest":
[

View File

@ -4,15 +4,16 @@
"convertedBy": "https://github.com/vladmandic",
"signature":
{
"inputs": {
"input_1": { "name": "input_1", "dtype": "DT_FLOAT", "tensorShape":{"dim":[{"size":"-1"},{"size":"224"},{"size":"224"},{"size":"3"}]} }
},
"outputs":
{
"gender_pred/Sigmoid:0": {"name":"gender_pred/Sigmoid:0", "dtype":"DT_FLOAT", "tensorShape":{"dim":[{"size":"1"},{"size":"1"}]} },
"global_pooling/Mean": {"name":"global_pooling/Mean", "dtype":"DT_FLOAT", "tensorShape":{"dim":[{"size":"1"},{"size":"1024"}]} },
"age_pred/Softmax:0": {"name":"age_pred/Softmax:0", "dtype":"DT_FLOAT", "tensorShape":{"dim":[{"size":"1"},{"size":"100"}]} }
}
"inputs":
{
"input_1": { "name": "input_1", "dtype": "DT_FLOAT", "tensorShape":{"dim":[{"size":"-1"},{"size":"224"},{"size":"224"},{"size":"3"}]} }
},
"outputs":
{
"gender_pred/Sigmoid:0": {"name":"gender_pred/Sigmoid:0", "dtype":"DT_FLOAT", "tensorShape":{"dim":[{"size":"1"},{"size":"1"}]} },
"global_pooling/Mean": {"name":"global_pooling/Mean", "dtype":"DT_FLOAT", "tensorShape":{"dim":[{"size":"1"},{"size":"1024"}]} },
"age_pred/Softmax:0": {"name":"age_pred/Softmax:0", "dtype":"DT_FLOAT", "tensorShape":{"dim":[{"size":"1"},{"size":"100"}]} }
}
},
"modelTopology":
{

View File

@ -4,11 +4,17 @@
"convertedBy": "https://github.com/vladmandic",
"userDefinedMetadata":
{
"signature":
"signature":
{
"inputs":
{
"inputs": {"input_1:0":{"name":"input_1:0","dtype":"DT_FLOAT","tensorShape":{"dim":[{"size":"-1"},{"size":"64"},{"size":"64"},{"size":"3"}]}}},
"outputs": {"Identity:0":{"name":"Identity:0","dtype":"DT_FLOAT","tensorShape":{"dim":[{"size":"-1"},{"size":"1"},{"size":"1"},{"size":"228"}]}}}
"input_1:0":{"name":"input_1:0","dtype":"DT_FLOAT","tensorShape":{"dim":[{"size":"-1"},{"size":"64"},{"size":"64"},{"size":"3"}]}}
},
"outputs":
{
"Identity:0":{"name":"Identity:0","dtype":"DT_FLOAT","tensorShape":{"dim":[{"size":"-1"},{"size":"1"},{"size":"1"},{"size":"228"}]}}
}
}
},
"modelTopology":
{

View File

@ -202,7 +202,7 @@ const config: Config = {
backend: 'webgl', // select tfjs backend to use, leave empty to use default backend
// can be 'webgl', 'wasm', 'cpu', or 'humangl' which is a custom version of webgl
modelBasePath: '../models/', // base path for all models
wasmPath: '../assets/', // path for wasm binariesm, only used for backend: wasm
wasmPath: '../node_modules/@tensorflow/tfjs-backend-wasm/dist//', // path for wasm binaries, only used for backend: wasm
debug: true, // print additional status messages to console
async: true, // execute enabled models in parallel
videoOptimized: true, // perform additional optimizations when input is video,