add static type definitions to main class

pull/193/head
Vladimir Mandic 2021-08-19 16:16:56 -04:00
parent db00c45278
commit ece985b6b7
21 changed files with 326 additions and 220 deletions

View File

@ -9,8 +9,9 @@ Repository: **<git+https://github.com/vladmandic/human.git>**
## Changelog ## Changelog
### **HEAD -> main** 2021/08/17 mandic00@live.com ### **HEAD -> main** 2021/08/18 mandic00@live.com
- rebuild full
- improve face box caching - improve face box caching
- strict type checks - strict type checks
- add webgu checks - add webgu checks

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -66,14 +66,14 @@
"@tensorflow/tfjs-layers": "^3.8.0", "@tensorflow/tfjs-layers": "^3.8.0",
"@tensorflow/tfjs-node": "^3.8.0", "@tensorflow/tfjs-node": "^3.8.0",
"@tensorflow/tfjs-node-gpu": "^3.8.0", "@tensorflow/tfjs-node-gpu": "^3.8.0",
"@types/node": "^16.6.1", "@types/node": "^16.6.2",
"@typescript-eslint/eslint-plugin": "^4.29.2", "@typescript-eslint/eslint-plugin": "^4.29.2",
"@typescript-eslint/parser": "^4.29.2", "@typescript-eslint/parser": "^4.29.2",
"@vladmandic/pilogger": "^0.2.18", "@vladmandic/pilogger": "^0.2.18",
"canvas": "^2.8.0", "canvas": "^2.8.0",
"chokidar": "^3.5.2", "chokidar": "^3.5.2",
"dayjs": "^1.10.6", "dayjs": "^1.10.6",
"esbuild": "^0.12.20", "esbuild": "^0.12.21",
"eslint": "^7.32.0", "eslint": "^7.32.0",
"eslint-config-airbnb-base": "^14.2.1", "eslint-config-airbnb-base": "^14.2.1",
"eslint-plugin-import": "^2.24.0", "eslint-plugin-import": "^2.24.0",
@ -85,7 +85,7 @@
"seedrandom": "^3.0.5", "seedrandom": "^3.0.5",
"simple-git": "^2.44.0", "simple-git": "^2.44.0",
"tslib": "^2.3.1", "tslib": "^2.3.1",
"typedoc": "0.21.5", "typedoc": "0.21.6",
"typescript": "4.3.5" "typescript": "4.3.5"
} }
} }

View File

@ -1,22 +1,22 @@
2021-08-18 14:27:34 INFO:  @vladmandic/human version 2.1.3 2021-08-19 16:13:34 INFO:  @vladmandic/human version 2.1.3
2021-08-18 14:27:34 INFO:  User: vlado Platform: linux Arch: x64 Node: v16.5.0 2021-08-19 16:13:34 INFO:  User: vlado Platform: linux Arch: x64 Node: v16.5.0
2021-08-18 14:27:34 INFO:  Toolchain: {"tfjs":"3.8.0","esbuild":"0.12.20","typescript":"4.3.5","typedoc":"0.21.5","eslint":"7.32.0"} 2021-08-19 16:13:34 INFO:  Toolchain: {"tfjs":"3.8.0","esbuild":"0.12.21","typescript":"4.3.5","typedoc":"0.21.6","eslint":"7.32.0"}
2021-08-18 14:27:34 INFO:  Clean: ["dist/*","types/*","typedoc/*"] 2021-08-19 16:13:34 INFO:  Clean: ["dist/*","types/*","typedoc/*"]
2021-08-18 14:27:34 INFO:  Build: file startup all type: production config: {"minifyWhitespace":true,"minifyIdentifiers":true,"minifySyntax":true} 2021-08-19 16:13:34 INFO:  Build: file startup all type: production config: {"minifyWhitespace":true,"minifyIdentifiers":true,"minifySyntax":true}
2021-08-18 14:27:34 STATE: target: node type: tfjs: {"imports":1,"importBytes":102,"outputBytes":1303,"outputFiles":"dist/tfjs.esm.js"} 2021-08-19 16:13:34 STATE: target: node type: tfjs: {"imports":1,"importBytes":102,"outputBytes":1303,"outputFiles":"dist/tfjs.esm.js"}
2021-08-18 14:27:34 STATE: target: node type: node: {"imports":42,"importBytes":436906,"outputBytes":379821,"outputFiles":"dist/human.node.js"} 2021-08-19 16:13:34 STATE: target: node type: node: {"imports":42,"importBytes":437161,"outputBytes":379821,"outputFiles":"dist/human.node.js"}
2021-08-18 14:27:34 STATE: target: nodeGPU type: tfjs: {"imports":1,"importBytes":110,"outputBytes":1311,"outputFiles":"dist/tfjs.esm.js"} 2021-08-19 16:13:34 STATE: target: nodeGPU type: tfjs: {"imports":1,"importBytes":110,"outputBytes":1311,"outputFiles":"dist/tfjs.esm.js"}
2021-08-18 14:27:34 STATE: target: nodeGPU type: node: {"imports":42,"importBytes":436914,"outputBytes":379825,"outputFiles":"dist/human.node-gpu.js"} 2021-08-19 16:13:34 STATE: target: nodeGPU type: node: {"imports":42,"importBytes":437169,"outputBytes":379825,"outputFiles":"dist/human.node-gpu.js"}
2021-08-18 14:27:34 STATE: target: nodeWASM type: tfjs: {"imports":1,"importBytes":149,"outputBytes":1378,"outputFiles":"dist/tfjs.esm.js"} 2021-08-19 16:13:34 STATE: target: nodeWASM type: tfjs: {"imports":1,"importBytes":149,"outputBytes":1378,"outputFiles":"dist/tfjs.esm.js"}
2021-08-18 14:27:34 STATE: target: nodeWASM type: node: {"imports":42,"importBytes":436981,"outputBytes":379897,"outputFiles":"dist/human.node-wasm.js"} 2021-08-19 16:13:34 STATE: target: nodeWASM type: node: {"imports":42,"importBytes":437236,"outputBytes":379897,"outputFiles":"dist/human.node-wasm.js"}
2021-08-18 14:27:34 STATE: target: browserNoBundle type: tfjs: {"imports":1,"importBytes":2168,"outputBytes":1242,"outputFiles":"dist/tfjs.esm.js"} 2021-08-19 16:13:34 STATE: target: browserNoBundle type: tfjs: {"imports":1,"importBytes":2168,"outputBytes":1242,"outputFiles":"dist/tfjs.esm.js"}
2021-08-18 14:27:34 STATE: target: browserNoBundle type: esm: {"imports":42,"importBytes":436845,"outputBytes":249180,"outputFiles":"dist/human.esm-nobundle.js"} 2021-08-19 16:13:34 STATE: target: browserNoBundle type: esm: {"imports":42,"importBytes":437100,"outputBytes":249180,"outputFiles":"dist/human.esm-nobundle.js"}
2021-08-18 14:27:35 STATE: target: browserBundle type: tfjs: {"modules":1170,"moduleBytes":4145868,"imports":7,"importBytes":2168,"outputBytes":2334701,"outputFiles":"dist/tfjs.esm.js"} 2021-08-19 16:13:35 STATE: target: browserBundle type: tfjs: {"modules":1170,"moduleBytes":4145868,"imports":7,"importBytes":2168,"outputBytes":2334701,"outputFiles":"dist/tfjs.esm.js"}
2021-08-18 14:27:35 STATE: target: browserBundle type: iife: {"imports":42,"importBytes":2770304,"outputBytes":1379548,"outputFiles":"dist/human.js"} 2021-08-19 16:13:35 STATE: target: browserBundle type: iife: {"imports":42,"importBytes":2770559,"outputBytes":1379548,"outputFiles":"dist/human.js"}
2021-08-18 14:27:35 STATE: target: browserBundle type: esm: {"imports":42,"importBytes":2770304,"outputBytes":1379540,"outputFiles":"dist/human.esm.js"} 2021-08-19 16:13:35 STATE: target: browserBundle type: esm: {"imports":42,"importBytes":2770559,"outputBytes":1379540,"outputFiles":"dist/human.esm.js"}
2021-08-18 14:27:35 INFO:  Running Linter: ["server/","src/","tfjs/","test/","demo/"] 2021-08-19 16:13:35 INFO:  Running Linter: ["server/","src/","tfjs/","test/","demo/"]
2021-08-18 14:27:55 INFO:  Linter complete: files: 77 errors: 0 warnings: 0 2021-08-19 16:13:59 INFO:  Linter complete: files: 77 errors: 0 warnings: 0
2021-08-18 14:27:55 INFO:  Generate ChangeLog: ["/home/vlado/dev/human/CHANGELOG.md"] 2021-08-19 16:13:59 INFO:  Generate ChangeLog: ["/home/vlado/dev/human/CHANGELOG.md"]
2021-08-18 14:27:55 INFO:  Generate Typings: ["src/human.ts"] outDir: ["types"] 2021-08-19 16:13:59 INFO:  Generate Typings: ["src/human.ts"] outDir: ["types"]
2021-08-18 14:28:08 INFO:  Generate TypeDocs: ["src/human.ts"] outDir: ["typedoc"] 2021-08-19 16:14:13 INFO:  Generate TypeDocs: ["src/human.ts"] outDir: ["typedoc"]
2021-08-18 14:28:19 INFO:  Documentation generated at /home/vlado/dev/human/typedoc 1 2021-08-19 16:14:29 INFO:  Documentation generated at /home/vlado/dev/human/typedoc 1

View File

@ -99,6 +99,16 @@ export class Human {
canvas: typeof draw.canvas, canvas: typeof draw.canvas,
all: typeof draw.all, all: typeof draw.all,
}; };
/** Types used by Human */
static Config: Config;
static Result: Result;
static Face: Face;
static Hand: Hand;
static Body: Body;
static Item: Item;
static Gesture: Gesture;
static Person: Gesture
static DrawOptions: draw.DrawOptions;
/** @internal: Currently loaded models */ /** @internal: Currently loaded models */
models: { models: {
face: [unknown, GraphModel | null, GraphModel | null] | null, face: [unknown, GraphModel | null, GraphModel | null] | null,

View File

@ -12,7 +12,7 @@ const tests = [
'test-node-wasm.js', 'test-node-wasm.js',
]; ];
const ignore = [ const ignoreMessages = [
'cpu_feature_guard.cc', 'cpu_feature_guard.cc',
'rebuild TensorFlow', 'rebuild TensorFlow',
'xla_gpu_device.cc', 'xla_gpu_device.cc',
@ -35,7 +35,7 @@ function logMessage(test, data) {
function logStdIO(ok, test, buffer) { function logStdIO(ok, test, buffer) {
const lines = buffer.toString().split(/\r\n|\n\r|\n|\r/); const lines = buffer.toString().split(/\r\n|\n\r|\n|\r/);
const filtered = lines.filter((line) => { const filtered = lines.filter((line) => {
for (const ignoreString of ignore) { for (const ignoreString of ignoreMessages) {
if (line.includes(ignoreString)) return false; if (line.includes(ignoreString)) return false;
} }
return true; return true;

View File

@ -1,169 +1,120 @@
2021-08-17 09:12:17 INFO:  @vladmandic/human version 2.1.3 2021-08-19 16:14:50 INFO:  @vladmandic/human version 2.1.3
2021-08-17 09:12:17 INFO:  User: vlado Platform: linux Arch: x64 Node: v16.5.0 2021-08-19 16:14:50 INFO:  User: vlado Platform: linux Arch: x64 Node: v16.5.0
2021-08-17 09:12:17 INFO:  tests: ["test-node.js","test-node-gpu.js","test-node-wasm.js"] 2021-08-19 16:14:50 INFO:  tests: ["test-node.js","test-node-gpu.js","test-node-wasm.js"]
2021-08-17 09:12:17 INFO:  test-node.js start 2021-08-19 16:14:50 INFO:  test-node.js start
2021-08-17 09:12:18 STATE: test-node.js passed: create human 2021-08-19 16:14:50 STATE: test-node.js passed: create human
2021-08-17 09:12:18 INFO:  test-node.js human version: 2.1.3 2021-08-19 16:14:50 INFO:  test-node.js human version: 2.1.3
2021-08-17 09:12:18 INFO:  test-node.js platform: linux x64 agent: NodeJS v16.5.0 2021-08-19 16:14:50 INFO:  test-node.js platform: linux x64 agent: NodeJS v16.5.0
2021-08-17 09:12:18 INFO:  test-node.js tfjs version: 3.8.0 2021-08-19 16:14:50 INFO:  test-node.js tfjs version: 3.8.0
2021-08-17 09:12:18 STATE: test-node.js passed: set backend: tensorflow 2021-08-19 16:14:51 STATE: test-node.js passed: set backend: tensorflow
2021-08-17 09:12:18 STATE: test-node.js passed: load models 2021-08-19 16:14:51 STATE: test-node.js passed: load models
2021-08-17 09:12:18 STATE: test-node.js result: defined models: 14 loaded models: 7 2021-08-19 16:14:51 STATE: test-node.js result: defined models: 14 loaded models: 7
2021-08-17 09:12:18 STATE: test-node.js passed: warmup: none default 2021-08-19 16:14:51 STATE: test-node.js passed: warmup: none default
2021-08-17 09:12:19 STATE: test-node.js passed: warmup: face default 2021-08-19 16:14:52 STATE: test-node.js passed: warmup: face default
2021-08-17 09:12:19 DATA:  test-node.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"age":23.6,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.42,"keypoints":4} 2021-08-19 16:14:52 DATA:  test-node.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"age":23.6,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.42,"keypoints":4}
2021-08-17 09:12:19 DATA:  test-node.js result: performance: load: 332 total: 1158 2021-08-19 16:14:52 DATA:  test-node.js result: performance: load: 418 total: 1284
2021-08-17 09:12:20 STATE: test-node.js passed: warmup: body default 2021-08-19 16:14:53 STATE: test-node.js passed: warmup: body default
2021-08-17 09:12:20 DATA:  test-node.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"age":29.5,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} 2021-08-19 16:14:53 DATA:  test-node.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"age":29.5,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17}
2021-08-17 09:12:20 DATA:  test-node.js result: performance: load: 332 total: 1080 2021-08-19 16:14:53 DATA:  test-node.js result: performance: load: 418 total: 1203
2021-08-17 09:12:20 INFO:  test-node.js test body variants 2021-08-19 16:14:53 INFO:  test-node.js test body variants
2021-08-17 09:12:21 STATE: test-node.js passed: load image: samples/ai-body.jpg [1,1200,1200,3] 2021-08-19 16:14:54 STATE: test-node.js passed: load image: samples/ai-body.jpg [1,1200,1200,3]
2021-08-17 09:12:22 STATE: test-node.js passed: detect: samples/ai-body.jpg posenet 2021-08-19 16:14:55 STATE: test-node.js passed: detect: samples/ai-body.jpg posenet
2021-08-17 09:12:22 DATA:  test-node.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"age":29.5,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.96,"keypoints":16} 2021-08-19 16:14:55 DATA:  test-node.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"age":29.5,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.96,"keypoints":16}
2021-08-17 09:12:22 DATA:  test-node.js result: performance: load: 332 total: 746 2021-08-19 16:14:55 DATA:  test-node.js result: performance: load: 418 total: 792
2021-08-17 09:12:23 STATE: test-node.js passed: load image: samples/ai-body.jpg [1,1200,1200,3] 2021-08-19 16:14:56 STATE: test-node.js passed: load image: samples/ai-body.jpg [1,1200,1200,3]
2021-08-17 09:12:23 STATE: test-node.js passed: detect: samples/ai-body.jpg movenet 2021-08-19 16:14:56 STATE: test-node.js passed: detect: samples/ai-body.jpg movenet
2021-08-17 09:12:23 DATA:  test-node.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"age":29.5,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} 2021-08-19 16:14:56 DATA:  test-node.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"age":29.5,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17}
2021-08-17 09:12:23 DATA:  test-node.js result: performance: load: 332 total: 195 2021-08-19 16:14:56 DATA:  test-node.js result: performance: load: 418 total: 220
2021-08-17 09:12:23 STATE: test-node.js passed: detect: random default 2021-08-19 16:14:57 STATE: test-node.js passed: detect: random default
2021-08-17 09:12:23 DATA:  test-node.js result: face: 0 body: 1 hand: 0 gesture: 0 object: 1 person: 0 {} {"score":0.72,"class":"person"} {"score":0,"keypoints":0} 2021-08-19 16:14:57 DATA:  test-node.js result: face: 0 body: 1 hand: 0 gesture: 0 object: 0 person: 0 {} {} {"score":0,"keypoints":0}
2021-08-17 09:12:23 DATA:  test-node.js result: performance: load: 332 total: 179 2021-08-19 16:14:57 DATA:  test-node.js result: performance: load: 418 total: 691
2021-08-17 09:12:23 INFO:  test-node.js test: first instance 2021-08-19 16:14:57 INFO:  test-node.js test: first instance
2021-08-17 09:12:24 STATE: test-node.js passed: load image: samples/ai-upper.jpg [1,720,688,3] 2021-08-19 16:14:57 STATE: test-node.js passed: load image: samples/ai-upper.jpg [1,720,688,3]
2021-08-17 09:12:24 STATE: test-node.js passed: detect: samples/ai-upper.jpg default 2021-08-19 16:14:58 STATE: test-node.js passed: detect: samples/ai-upper.jpg default
2021-08-17 09:12:24 DATA:  test-node.js result: face: 0 body: 1 hand: 0 gesture: 1 object: 1 person: 0 {} {"score":0.72,"class":"person"} {"score":0.69,"keypoints":10} 2021-08-19 16:14:58 DATA:  test-node.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"age":29.5,"gender":"female"} {"score":0.71,"class":"person"} {"score":0.69,"keypoints":10}
2021-08-17 09:12:24 DATA:  test-node.js result: performance: load: 332 total: 140 2021-08-19 16:14:58 DATA:  test-node.js result: performance: load: 418 total: 1042
2021-08-17 09:12:24 INFO:  test-node.js test: second instance 2021-08-19 16:14:58 INFO:  test-node.js test: second instance
2021-08-17 09:12:24 STATE: test-node.js passed: load image: samples/ai-upper.jpg [1,720,688,3] 2021-08-19 16:14:58 STATE: test-node.js passed: load image: samples/ai-upper.jpg [1,720,688,3]
2021-08-17 09:12:25 STATE: test-node.js passed: detect: samples/ai-upper.jpg default 2021-08-19 16:14:59 STATE: test-node.js passed: detect: samples/ai-upper.jpg default
2021-08-17 09:12:25 DATA:  test-node.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"age":29.5,"gender":"female"} {"score":0.71,"class":"person"} {"score":0.69,"keypoints":10} 2021-08-19 16:14:59 DATA:  test-node.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"age":29.5,"gender":"female"} {"score":0.71,"class":"person"} {"score":0.69,"keypoints":10}
2021-08-17 09:12:25 DATA:  test-node.js result: performance: load: 3 total: 1043 2021-08-19 16:14:59 DATA:  test-node.js result: performance: load: 3 total: 1006
2021-08-17 09:12:25 INFO:  test-node.js test: concurrent 2021-08-19 16:14:59 INFO:  test-node.js test: concurrent
2021-08-17 09:12:25 STATE: test-node.js passed: load image: samples/ai-face.jpg [1,256,256,3] 2021-08-19 16:15:00 STATE: test-node.js passed: load image: samples/ai-face.jpg [1,256,256,3]
2021-08-17 09:12:25 STATE: test-node.js passed: load image: samples/ai-face.jpg [1,256,256,3] 2021-08-19 16:15:00 STATE: test-node.js passed: load image: samples/ai-face.jpg [1,256,256,3]
2021-08-17 09:12:26 STATE: test-node.js passed: load image: samples/ai-body.jpg [1,1200,1200,3] 2021-08-19 16:15:00 STATE: test-node.js passed: load image: samples/ai-body.jpg [1,1200,1200,3]
2021-08-17 09:12:27 STATE: test-node.js passed: load image: samples/ai-body.jpg [1,1200,1200,3] 2021-08-19 16:15:01 STATE: test-node.js passed: load image: samples/ai-body.jpg [1,1200,1200,3]
2021-08-17 09:12:31 STATE: test-node.js passed: detect: samples/ai-face.jpg default 2021-08-19 16:15:07 STATE: test-node.js passed: detect: samples/ai-face.jpg default
2021-08-17 09:12:31 DATA:  test-node.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 1 person: 1 {"age":23.6,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.47,"keypoints":42} 2021-08-19 16:15:07 DATA:  test-node.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 1 person: 1 {"age":23.6,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.47,"keypoints":42}
2021-08-17 09:12:31 DATA:  test-node.js result: performance: load: 332 total: 4402 2021-08-19 16:15:07 DATA:  test-node.js result: performance: load: 418 total: 5554
2021-08-17 09:12:31 STATE: test-node.js passed: detect: samples/ai-face.jpg default 2021-08-19 16:15:07 STATE: test-node.js passed: detect: samples/ai-face.jpg default
2021-08-17 09:12:31 DATA:  test-node.js result: face: 1 body: 1 hand: 0 gesture: 5 object: 1 person: 1 {"age":23.6,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.47,"keypoints":42} 2021-08-19 16:15:07 DATA:  test-node.js result: face: 1 body: 1 hand: 0 gesture: 5 object: 1 person: 1 {"age":23.6,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.47,"keypoints":42}
2021-08-17 09:12:31 DATA:  test-node.js result: performance: load: 3 total: 4402 2021-08-19 16:15:07 DATA:  test-node.js result: performance: load: 3 total: 5554
2021-08-17 09:12:31 STATE: test-node.js passed: detect: samples/ai-body.jpg default 2021-08-19 16:15:07 STATE: test-node.js passed: detect: samples/ai-body.jpg default
2021-08-17 09:12:31 DATA:  test-node.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"age":28.5,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":42} 2021-08-19 16:15:07 DATA:  test-node.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"age":28.5,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":42}
2021-08-17 09:12:31 DATA:  test-node.js result: performance: load: 332 total: 4402 2021-08-19 16:15:07 DATA:  test-node.js result: performance: load: 418 total: 5554
2021-08-17 09:12:31 STATE: test-node.js passed: detect: samples/ai-body.jpg default 2021-08-19 16:15:07 STATE: test-node.js passed: detect: samples/ai-body.jpg default
2021-08-17 09:12:31 DATA:  test-node.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"age":28.5,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":42} 2021-08-19 16:15:07 DATA:  test-node.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"age":28.5,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":42}
2021-08-17 09:12:31 DATA:  test-node.js result: performance: load: 3 total: 4402 2021-08-19 16:15:07 DATA:  test-node.js result: performance: load: 3 total: 5554
2021-08-17 09:12:31 INFO:  test-node.js test complete: 13794 ms 2021-08-19 16:15:07 INFO:  test-node.js test complete: 16737 ms
2021-08-17 09:12:31 INFO:  test-node-gpu.js start 2021-08-19 16:15:07 INFO:  test-node-gpu.js start
2021-08-17 09:12:32 WARN:  test-node-gpu.js stderr: 2021-08-17 09:12:32.336897: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory 2021-08-19 16:15:08 WARN:  test-node-gpu.js stderr: 2021-08-19 16:15:08.166531: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory
2021-08-17 09:12:32 WARN:  test-node-gpu.js stderr: 2021-08-17 09:12:32.387680: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory 2021-08-19 16:15:08 WARN:  test-node-gpu.js stderr: 2021-08-19 16:15:08.343531: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory
2021-08-17 09:12:32 WARN:  test-node-gpu.js stderr: 2021-08-17 09:12:32.387718: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (wyse): /proc/driver/nvidia/version does not exist 2021-08-19 16:15:08 WARN:  test-node-gpu.js stderr: 2021-08-19 16:15:08.343658: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (wyse): /proc/driver/nvidia/version does not exist
2021-08-17 09:12:32 STATE: test-node-gpu.js passed: create human 2021-08-19 16:15:08 STATE: test-node-gpu.js passed: create human
2021-08-17 09:12:32 INFO:  test-node-gpu.js human version: 2.1.3 2021-08-19 16:15:08 INFO:  test-node-gpu.js human version: 2.1.3
2021-08-17 09:12:32 INFO:  test-node-gpu.js platform: linux x64 agent: NodeJS v16.5.0 2021-08-19 16:15:08 INFO:  test-node-gpu.js platform: linux x64 agent: NodeJS v16.5.0
2021-08-17 09:12:32 INFO:  test-node-gpu.js tfjs version: 3.8.0 2021-08-19 16:15:08 INFO:  test-node-gpu.js tfjs version: 3.8.0
2021-08-17 09:12:32 STATE: test-node-gpu.js passed: set backend: tensorflow 2021-08-19 16:15:08 STATE: test-node-gpu.js passed: set backend: tensorflow
2021-08-17 09:12:32 STATE: test-node-gpu.js passed: load models 2021-08-19 16:15:08 STATE: test-node-gpu.js passed: load models
2021-08-17 09:12:32 STATE: test-node-gpu.js result: defined models: 14 loaded models: 7 2021-08-19 16:15:08 STATE: test-node-gpu.js result: defined models: 14 loaded models: 7
2021-08-17 09:12:32 STATE: test-node-gpu.js passed: warmup: none default 2021-08-19 16:15:08 STATE: test-node-gpu.js passed: warmup: none default
2021-08-17 09:12:33 STATE: test-node-gpu.js passed: warmup: face default 2021-08-19 16:15:10 STATE: test-node-gpu.js passed: warmup: face default
2021-08-17 09:12:33 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"age":23.6,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.42,"keypoints":4} 2021-08-19 16:15:10 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"age":23.6,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.42,"keypoints":4}
2021-08-17 09:12:33 DATA:  test-node-gpu.js result: performance: load: 294 total: 1143 2021-08-19 16:15:10 DATA:  test-node-gpu.js result: performance: load: 285 total: 1378
2021-08-17 09:12:35 STATE: test-node-gpu.js passed: warmup: body default 2021-08-19 16:15:11 STATE: test-node-gpu.js passed: warmup: body default
2021-08-17 09:12:35 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"age":29.5,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} 2021-08-19 16:15:11 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"age":29.5,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17}
2021-08-17 09:12:35 DATA:  test-node-gpu.js result: performance: load: 294 total: 1140 2021-08-19 16:15:11 DATA:  test-node-gpu.js result: performance: load: 285 total: 1206
2021-08-17 09:12:35 INFO:  test-node-gpu.js test body variants 2021-08-19 16:15:11 INFO:  test-node-gpu.js test body variants
2021-08-17 09:12:35 STATE: test-node-gpu.js passed: load image: samples/ai-body.jpg [1,1200,1200,3] 2021-08-19 16:15:12 STATE: test-node-gpu.js passed: load image: samples/ai-body.jpg [1,1200,1200,3]
2021-08-17 09:12:36 STATE: test-node-gpu.js passed: detect: samples/ai-body.jpg posenet 2021-08-19 16:15:13 STATE: test-node-gpu.js passed: detect: samples/ai-body.jpg posenet
2021-08-17 09:12:36 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"age":29.5,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.96,"keypoints":16} 2021-08-19 16:15:13 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"age":29.5,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.96,"keypoints":16}
2021-08-17 09:12:36 DATA:  test-node-gpu.js result: performance: load: 294 total: 769 2021-08-19 16:15:13 DATA:  test-node-gpu.js result: performance: load: 285 total: 788
2021-08-17 09:12:37 STATE: test-node-gpu.js passed: load image: samples/ai-body.jpg [1,1200,1200,3] 2021-08-19 16:15:13 STATE: test-node-gpu.js passed: load image: samples/ai-body.jpg [1,1200,1200,3]
2021-08-17 09:12:37 STATE: test-node-gpu.js passed: detect: samples/ai-body.jpg movenet 2021-08-19 16:15:14 STATE: test-node-gpu.js passed: detect: samples/ai-body.jpg movenet
2021-08-17 09:12:37 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"age":29.5,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} 2021-08-19 16:15:14 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"age":29.5,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17}
2021-08-17 09:12:37 DATA:  test-node-gpu.js result: performance: load: 294 total: 245 2021-08-19 16:15:14 DATA:  test-node-gpu.js result: performance: load: 285 total: 218
2021-08-17 09:12:38 STATE: test-node-gpu.js passed: detect: random default 2021-08-19 16:15:14 STATE: test-node-gpu.js passed: detect: random default
2021-08-17 09:12:38 DATA:  test-node-gpu.js result: face: 0 body: 1 hand: 0 gesture: 0 object: 0 person: 0 {} {} {"score":0,"keypoints":0} 2021-08-19 16:15:14 DATA:  test-node-gpu.js result: face: 0 body: 1 hand: 0 gesture: 0 object: 1 person: 0 {} {"score":0.72,"class":"person"} {"score":0,"keypoints":0}
2021-08-17 09:12:38 DATA:  test-node-gpu.js result: performance: load: 294 total: 610 2021-08-19 16:15:14 DATA:  test-node-gpu.js result: performance: load: 285 total: 193
2021-08-17 09:12:38 INFO:  test-node-gpu.js test: first instance 2021-08-19 16:15:14 INFO:  test-node-gpu.js test: first instance
2021-08-17 09:12:38 STATE: test-node-gpu.js passed: load image: samples/ai-upper.jpg [1,720,688,3] 2021-08-19 16:15:14 STATE: test-node-gpu.js passed: load image: samples/ai-upper.jpg [1,720,688,3]
2021-08-17 09:12:39 STATE: test-node-gpu.js passed: detect: samples/ai-upper.jpg default 2021-08-19 16:15:14 STATE: test-node-gpu.js passed: detect: samples/ai-upper.jpg default
2021-08-17 09:12:39 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"age":29.5,"gender":"female"} {"score":0.71,"class":"person"} {"score":0.69,"keypoints":10} 2021-08-19 16:15:14 DATA:  test-node-gpu.js result: face: 0 body: 1 hand: 0 gesture: 1 object: 1 person: 0 {} {"score":0.72,"class":"person"} {"score":0.69,"keypoints":10}
2021-08-17 09:12:39 DATA:  test-node-gpu.js result: performance: load: 294 total: 989 2021-08-19 16:15:14 DATA:  test-node-gpu.js result: performance: load: 285 total: 143
2021-08-17 09:12:39 INFO:  test-node-gpu.js test: second instance 2021-08-19 16:15:14 INFO:  test-node-gpu.js test: second instance
2021-08-17 09:12:40 STATE: test-node-gpu.js passed: load image: samples/ai-upper.jpg [1,720,688,3] 2021-08-19 16:15:15 STATE: test-node-gpu.js passed: load image: samples/ai-upper.jpg [1,720,688,3]
2021-08-17 09:12:41 STATE: test-node-gpu.js passed: detect: samples/ai-upper.jpg default 2021-08-19 16:15:16 STATE: test-node-gpu.js passed: detect: samples/ai-upper.jpg default
2021-08-17 09:12:41 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"age":29.5,"gender":"female"} {"score":0.71,"class":"person"} {"score":0.69,"keypoints":10} 2021-08-19 16:15:16 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"age":29.5,"gender":"female"} {"score":0.71,"class":"person"} {"score":0.69,"keypoints":10}
2021-08-17 09:12:41 DATA:  test-node-gpu.js result: performance: load: 4 total: 943 2021-08-19 16:15:16 DATA:  test-node-gpu.js result: performance: load: 5 total: 1003
2021-08-17 09:12:41 INFO:  test-node-gpu.js test: concurrent 2021-08-19 16:15:16 INFO:  test-node-gpu.js test: concurrent
2021-08-17 09:12:41 STATE: test-node-gpu.js passed: load image: samples/ai-face.jpg [1,256,256,3] 2021-08-19 16:15:16 STATE: test-node-gpu.js passed: load image: samples/ai-face.jpg [1,256,256,3]
2021-08-17 09:12:41 STATE: test-node-gpu.js passed: load image: samples/ai-face.jpg [1,256,256,3] 2021-08-19 16:15:16 STATE: test-node-gpu.js passed: load image: samples/ai-face.jpg [1,256,256,3]
2021-08-17 09:12:41 STATE: test-node-gpu.js passed: load image: samples/ai-body.jpg [1,1200,1200,3] 2021-08-19 16:15:17 STATE: test-node-gpu.js passed: load image: samples/ai-body.jpg [1,1200,1200,3]
2021-08-17 09:12:42 STATE: test-node-gpu.js passed: load image: samples/ai-body.jpg [1,1200,1200,3] 2021-08-19 16:15:18 STATE: test-node-gpu.js passed: load image: samples/ai-body.jpg [1,1200,1200,3]
2021-08-17 09:12:47 STATE: test-node-gpu.js passed: detect: samples/ai-face.jpg default 2021-08-19 16:15:22 STATE: test-node-gpu.js passed: detect: samples/ai-face.jpg default
2021-08-17 09:12:47 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 1 person: 1 {"age":23.6,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.47,"keypoints":42} 2021-08-19 16:15:22 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 1 person: 1 {"age":23.6,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.47,"keypoints":42}
2021-08-17 09:12:47 DATA:  test-node-gpu.js result: performance: load: 294 total: 4310 2021-08-19 16:15:22 DATA:  test-node-gpu.js result: performance: load: 285 total: 4653
2021-08-17 09:12:47 STATE: test-node-gpu.js passed: detect: samples/ai-face.jpg default 2021-08-19 16:15:22 STATE: test-node-gpu.js passed: detect: samples/ai-face.jpg default
2021-08-17 09:12:47 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 5 object: 1 person: 1 {"age":23.6,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.47,"keypoints":42} 2021-08-19 16:15:22 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 5 object: 1 person: 1 {"age":23.6,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.47,"keypoints":42}
2021-08-17 09:12:47 DATA:  test-node-gpu.js result: performance: load: 4 total: 4310 2021-08-19 16:15:22 DATA:  test-node-gpu.js result: performance: load: 5 total: 4653
2021-08-17 09:12:47 STATE: test-node-gpu.js passed: detect: samples/ai-body.jpg default 2021-08-19 16:15:22 STATE: test-node-gpu.js passed: detect: samples/ai-body.jpg default
2021-08-17 09:12:47 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"age":28.5,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":42} 2021-08-19 16:15:22 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"age":28.5,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":42}
2021-08-17 09:12:47 DATA:  test-node-gpu.js result: performance: load: 294 total: 4310 2021-08-19 16:15:22 DATA:  test-node-gpu.js result: performance: load: 285 total: 4653
2021-08-17 09:12:47 STATE: test-node-gpu.js passed: detect: samples/ai-body.jpg default 2021-08-19 16:15:22 STATE: test-node-gpu.js passed: detect: samples/ai-body.jpg default
2021-08-17 09:12:47 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"age":28.5,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":42} 2021-08-19 16:15:22 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"age":28.5,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":42}
2021-08-17 09:12:47 DATA:  test-node-gpu.js result: performance: load: 4 total: 4310 2021-08-19 16:15:22 DATA:  test-node-gpu.js result: performance: load: 5 total: 4653
2021-08-17 09:12:47 INFO:  test-node-gpu.js test complete: 14687 ms 2021-08-19 16:15:22 INFO:  test-node-gpu.js test complete: 14260 ms
2021-08-17 09:12:47 INFO:  test-node-wasm.js start 2021-08-19 16:15:23 INFO:  test-node-wasm.js start
2021-08-17 09:12:47 STATE: test-node-wasm.js passed: model server: http://localhost:10030/models/ 2021-08-19 16:15:23 ERROR: test-node-wasm.js failed: model server: request to http://localhost:10030/models/ failed, reason: connect ECONNREFUSED 127.0.0.1:10030
2021-08-17 09:12:47 STATE: test-node-wasm.js passed: create human 2021-08-19 16:15:23 ERROR: test-node-wasm.js aborting test
2021-08-17 09:12:47 INFO:  test-node-wasm.js human version: 2.1.3 2021-08-19 16:15:23 INFO:  status: {"passed":46,"failed":1}
2021-08-17 09:12:47 INFO:  test-node-wasm.js platform: linux x64 agent: NodeJS v16.5.0
2021-08-17 09:12:47 INFO:  test-node-wasm.js tfjs version: 3.8.0
2021-08-17 09:12:48 STATE: test-node-wasm.js passed: set backend: wasm
2021-08-17 09:12:48 STATE: test-node-wasm.js passed: load models
2021-08-17 09:12:48 STATE: test-node-wasm.js result: defined models: 14 loaded models: 6
2021-08-17 09:12:48 STATE: test-node-wasm.js passed: warmup: none default
2021-08-17 09:12:48 ERROR: test-node-wasm.js failed: warmup: face default
2021-08-17 09:12:48 ERROR: test-node-wasm.js failed: warmup: body default
2021-08-17 09:12:48 INFO:  test-node-wasm.js test body variants
2021-08-17 09:12:49 STATE: test-node-wasm.js passed: load image: samples/ai-body.jpg [1,1200,1200,3]
2021-08-17 09:12:51 STATE: test-node-wasm.js passed: detect: samples/ai-body.jpg posenet
2021-08-17 09:12:51 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 0 person: 1 {"age":28.5,"gender":"female"} {} {"score":0.96,"keypoints":16}
2021-08-17 09:12:51 DATA:  test-node-wasm.js result: performance: load: 573 total: 1616
2021-08-17 09:12:52 STATE: test-node-wasm.js passed: load image: samples/ai-body.jpg [1,1200,1200,3]
2021-08-17 09:12:53 STATE: test-node-wasm.js passed: detect: samples/ai-body.jpg movenet
2021-08-17 09:12:53 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 0 person: 1 {"age":28.5,"gender":"female"} {} {"score":0.92,"keypoints":17}
2021-08-17 09:12:53 DATA:  test-node-wasm.js result: performance: load: 573 total: 902
2021-08-17 09:12:53 STATE: test-node-wasm.js passed: detect: random default
2021-08-17 09:12:53 DATA:  test-node-wasm.js result: face: 0 body: 1 hand: 0 gesture: 1 object: 0 person: 0 {} {} {"score":0.92,"keypoints":17}
2021-08-17 09:12:53 DATA:  test-node-wasm.js result: performance: load: 573 total: 92
2021-08-17 09:12:53 INFO:  test-node-wasm.js test: first instance
2021-08-17 09:12:54 STATE: test-node-wasm.js passed: load image: samples/ai-upper.jpg [1,720,688,3]
2021-08-17 09:12:54 STATE: test-node-wasm.js passed: detect: samples/ai-upper.jpg default
2021-08-17 09:12:54 DATA:  test-node-wasm.js result: face: 0 body: 1 hand: 0 gesture: 1 object: 0 person: 0 {} {} {"score":0.69,"keypoints":10}
2021-08-17 09:12:54 DATA:  test-node-wasm.js result: performance: load: 573 total: 141
2021-08-17 09:12:54 INFO:  test-node-wasm.js test: second instance
2021-08-17 09:12:55 STATE: test-node-wasm.js passed: load image: samples/ai-upper.jpg [1,720,688,3]
2021-08-17 09:12:56 STATE: test-node-wasm.js passed: detect: samples/ai-upper.jpg default
2021-08-17 09:12:56 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 0 person: 1 {"age":29.5,"gender":"female"} {} {"score":0.69,"keypoints":10}
2021-08-17 09:12:56 DATA:  test-node-wasm.js result: performance: load: 4 total: 987
2021-08-17 09:12:56 INFO:  test-node-wasm.js test: concurrent
2021-08-17 09:12:56 STATE: test-node-wasm.js passed: load image: samples/ai-face.jpg [1,256,256,3]
2021-08-17 09:12:56 STATE: test-node-wasm.js passed: load image: samples/ai-face.jpg [1,256,256,3]
2021-08-17 09:12:57 STATE: test-node-wasm.js passed: load image: samples/ai-body.jpg [1,1200,1200,3]
2021-08-17 09:12:59 STATE: test-node-wasm.js passed: load image: samples/ai-body.jpg [1,1200,1200,3]
2021-08-17 09:13:03 STATE: test-node-wasm.js passed: detect: samples/ai-face.jpg default
2021-08-17 09:13:03 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 0 person: 1 {"age":23.6,"gender":"female"} {} {"score":0.47,"keypoints":42}
2021-08-17 09:13:03 DATA:  test-node-wasm.js result: performance: load: 573 total: 3926
2021-08-17 09:13:03 STATE: test-node-wasm.js passed: detect: samples/ai-face.jpg default
2021-08-17 09:13:03 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 5 object: 0 person: 1 {"age":23.6,"gender":"female"} {} {"score":0.47,"keypoints":42}
2021-08-17 09:13:03 DATA:  test-node-wasm.js result: performance: load: 4 total: 3926
2021-08-17 09:13:03 STATE: test-node-wasm.js passed: detect: samples/ai-body.jpg default
2021-08-17 09:13:03 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 0 person: 1 {"age":28.5,"gender":"female"} {} {"score":0.92,"keypoints":42}
2021-08-17 09:13:03 DATA:  test-node-wasm.js result: performance: load: 573 total: 3926
2021-08-17 09:13:03 STATE: test-node-wasm.js passed: detect: samples/ai-body.jpg default
2021-08-17 09:13:03 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 0 person: 1 {"age":28.5,"gender":"female"} {} {"score":0.92,"keypoints":42}
2021-08-17 09:13:03 DATA:  test-node-wasm.js result: performance: load: 4 total: 3926
2021-08-17 09:13:03 INFO:  test-node-wasm.js test complete: 15921 ms
2021-08-17 09:13:03 INFO:  status: {"passed":68,"failed":2}

File diff suppressed because one or more lines are too long

View File

@ -70,13 +70,13 @@
</div> </div>
<p>All methods and properties are available only as members of Human class</p> <p>All methods and properties are available only as members of Human class</p>
<ul> <ul>
<li>Configuration object definition: <a href="../interfaces/Config.html">Config</a></li> <li>Configuration object definition: <a href="Human.html#Config">Config</a></li>
<li>Results object definition: <a href="../interfaces/Result.html">Result</a></li> <li>Results object definition: <a href="Human.html#Result">Result</a></li>
<li>Possible inputs: <a href="../index.html#Input">Input</a></li> <li>Possible inputs: <a href="../index.html#Input">Input</a></li>
</ul> </ul>
<dl class="tsd-comment-tags"> <dl class="tsd-comment-tags">
<dt>param</dt> <dt>param</dt>
<dd><p><a href="../interfaces/Config.html">Config</a></p> <dd><p><a href="Human.html#Config">Config</a></p>
</dd> </dd>
</dl> </dl>
</div> </div>
@ -114,6 +114,15 @@
<li class="tsd-kind-property tsd-parent-kind-class"><a href="Human.html#sysinfo" class="tsd-kind-icon">sysinfo</a></li> <li class="tsd-kind-property tsd-parent-kind-class"><a href="Human.html#sysinfo" class="tsd-kind-icon">sysinfo</a></li>
<li class="tsd-kind-property tsd-parent-kind-class"><a href="Human.html#tf" class="tsd-kind-icon">tf</a></li> <li class="tsd-kind-property tsd-parent-kind-class"><a href="Human.html#tf" class="tsd-kind-icon">tf</a></li>
<li class="tsd-kind-property tsd-parent-kind-class"><a href="Human.html#version" class="tsd-kind-icon">version</a></li> <li class="tsd-kind-property tsd-parent-kind-class"><a href="Human.html#version" class="tsd-kind-icon">version</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><a href="Human.html#Body" class="tsd-kind-icon">Body</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><a href="Human.html#Config" class="tsd-kind-icon">Config</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><a href="Human.html#DrawOptions" class="tsd-kind-icon">Draw<wbr>Options</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><a href="Human.html#Face" class="tsd-kind-icon">Face</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><a href="Human.html#Gesture" class="tsd-kind-icon">Gesture</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><a href="Human.html#Hand" class="tsd-kind-icon">Hand</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><a href="Human.html#Item" class="tsd-kind-icon">Item</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><a href="Human.html#Person" class="tsd-kind-icon">Person</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><a href="Human.html#Result" class="tsd-kind-icon">Result</a></li>
</ul> </ul>
</section> </section>
<section class="tsd-index-section "> <section class="tsd-index-section ">
@ -172,7 +181,7 @@
<div class="lead"> <div class="lead">
<p>Current configuration</p> <p>Current configuration</p>
<ul> <ul>
<li>Details: <a href="../interfaces/Config.html">Config</a></li> <li>Details: <a href="Human.html#Config">Config</a></li>
</ul> </ul>
</div> </div>
</div> </div>
@ -187,7 +196,7 @@
<div class="lead"> <div class="lead">
<p>Draw helper classes that can draw detected objects on canvas using specified draw</p> <p>Draw helper classes that can draw detected objects on canvas using specified draw</p>
<ul> <ul>
<li>options: <a href="../interfaces/DrawOptions.html">DrawOptions</a> global settings for all draw operations, can be overriden for each draw method</li> <li>options: <a href="Human.html#DrawOptions">DrawOptions</a> global settings for all draw operations, can be overriden for each draw method</li>
<li>face: draw detected faces</li> <li>face: draw detected faces</li>
<li>body: draw detected people and body parts</li> <li>body: draw detected people and body parts</li>
<li>hand: draw detected hands and hand parts</li> <li>hand: draw detected hands and hand parts</li>
@ -569,6 +578,74 @@
</div> </div>
</div> </div>
</section> </section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-static">
<a name="Body" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagStatic">Static</span> Body</h3>
<div class="tsd-signature tsd-kind-icon">Body<span class="tsd-signature-symbol">:</span> <a href="../interfaces/Body.html" class="tsd-signature-type" data-tsd-kind="Interface">Body</a></div>
<aside class="tsd-sources">
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-static">
<a name="Config" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagStatic">Static</span> Config</h3>
<div class="tsd-signature tsd-kind-icon">Config<span class="tsd-signature-symbol">:</span> <a href="../interfaces/Config.html" class="tsd-signature-type" data-tsd-kind="Interface">Config</a></div>
<aside class="tsd-sources">
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Types used by Human</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-static">
<a name="DrawOptions" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagStatic">Static</span> Draw<wbr>Options</h3>
<div class="tsd-signature tsd-kind-icon">Draw<wbr>Options<span class="tsd-signature-symbol">:</span> <a href="../interfaces/DrawOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">DrawOptions</a></div>
<aside class="tsd-sources">
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-static">
<a name="Face" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagStatic">Static</span> Face</h3>
<div class="tsd-signature tsd-kind-icon">Face<span class="tsd-signature-symbol">:</span> <a href="../interfaces/Face.html" class="tsd-signature-type" data-tsd-kind="Interface">Face</a></div>
<aside class="tsd-sources">
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-static">
<a name="Gesture" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagStatic">Static</span> Gesture</h3>
<div class="tsd-signature tsd-kind-icon">Gesture<span class="tsd-signature-symbol">:</span> <a href="../index.html#Gesture" class="tsd-signature-type" data-tsd-kind="Type alias">Gesture</a></div>
<aside class="tsd-sources">
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-static">
<a name="Hand" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagStatic">Static</span> Hand</h3>
<div class="tsd-signature tsd-kind-icon">Hand<span class="tsd-signature-symbol">:</span> <a href="../interfaces/Hand.html" class="tsd-signature-type" data-tsd-kind="Interface">Hand</a></div>
<aside class="tsd-sources">
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-static">
<a name="Item" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagStatic">Static</span> Item</h3>
<div class="tsd-signature tsd-kind-icon">Item<span class="tsd-signature-symbol">:</span> <a href="../interfaces/Item.html" class="tsd-signature-type" data-tsd-kind="Interface">Item</a></div>
<aside class="tsd-sources">
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-static">
<a name="Person" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagStatic">Static</span> Person</h3>
<div class="tsd-signature tsd-kind-icon">Person<span class="tsd-signature-symbol">:</span> <a href="../index.html#Gesture" class="tsd-signature-type" data-tsd-kind="Type alias">Gesture</a></div>
<aside class="tsd-sources">
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-static">
<a name="Result" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagStatic">Static</span> Result</h3>
<div class="tsd-signature tsd-kind-icon">Result<span class="tsd-signature-symbol">:</span> <a href="../interfaces/Result.html" class="tsd-signature-type" data-tsd-kind="Interface">Result</a></div>
<aside class="tsd-sources">
</aside>
</section>
</section> </section>
<section class="tsd-panel-group tsd-member-group "> <section class="tsd-panel-group tsd-member-group ">
<h2>Methods</h2> <h2>Methods</h2>
@ -586,10 +663,10 @@
<div class="lead"> <div class="lead">
<p>Main detection method</p> <p>Main detection method</p>
<ul> <ul>
<li>Analyze configuration: <a href="../interfaces/Config.html">Config</a></li> <li>Analyze configuration: <a href="Human.html#Config">Config</a></li>
<li>Pre-process input: <a href="../index.html#Input">Input</a></li> <li>Pre-process input: <a href="../index.html#Input">Input</a></li>
<li>Run inference for all configured models</li> <li>Run inference for all configured models</li>
<li>Process and return result: <a href="../interfaces/Result.html">Result</a></li> <li>Process and return result: <a href="Human.html#Result">Result</a></li>
</ul> </ul>
</div> </div>
</div> </div>
@ -603,7 +680,7 @@
</li> </li>
</ul> </ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../index.html#Error" class="tsd-signature-type" data-tsd-kind="Type alias">Error</a><span class="tsd-signature-symbol"> | </span><a href="../interfaces/Result.html" class="tsd-signature-type" data-tsd-kind="Interface">Result</a><span class="tsd-signature-symbol">&gt;</span></h4> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../index.html#Error" class="tsd-signature-type" data-tsd-kind="Type alias">Error</a><span class="tsd-signature-symbol"> | </span><a href="../interfaces/Result.html" class="tsd-signature-type" data-tsd-kind="Interface">Result</a><span class="tsd-signature-symbol">&gt;</span></h4>
<p>result: <a href="../interfaces/Result.html">Result</a></p> <p>result: <a href="Human.html#Result">Result</a></p>
</li> </li>
</ul> </ul>
</section> </section>
@ -730,7 +807,7 @@
</li> </li>
</ul> </ul>
<h4 class="tsd-returns-title">Returns <a href="../interfaces/Result.html" class="tsd-signature-type" data-tsd-kind="Interface">Result</a></h4> <h4 class="tsd-returns-title">Returns <a href="../interfaces/Result.html" class="tsd-signature-type" data-tsd-kind="Interface">Result</a></h4>
<p>result: <a href="../interfaces/Result.html">Result</a></p> <p>result: <a href="Human.html#Result">Result</a></p>
</li> </li>
</ul> </ul>
</section> </section>
@ -885,6 +962,33 @@
<li class=" tsd-kind-property tsd-parent-kind-class"> <li class=" tsd-kind-property tsd-parent-kind-class">
<a href="Human.html#version" class="tsd-kind-icon">version</a> <a href="Human.html#version" class="tsd-kind-icon">version</a>
</li> </li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-static">
<a href="Human.html#Body" class="tsd-kind-icon">Body</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-static">
<a href="Human.html#Config" class="tsd-kind-icon">Config</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-static">
<a href="Human.html#DrawOptions" class="tsd-kind-icon">Draw<wbr>Options</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-static">
<a href="Human.html#Face" class="tsd-kind-icon">Face</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-static">
<a href="Human.html#Gesture" class="tsd-kind-icon">Gesture</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-static">
<a href="Human.html#Hand" class="tsd-kind-icon">Hand</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-static">
<a href="Human.html#Item" class="tsd-kind-icon">Item</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-static">
<a href="Human.html#Person" class="tsd-kind-icon">Person</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-static">
<a href="Human.html#Result" class="tsd-kind-icon">Result</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class"> <li class=" tsd-kind-method tsd-parent-kind-class">
<a href="Human.html#detect" class="tsd-kind-icon">detect</a> <a href="Human.html#detect" class="tsd-kind-icon">detect</a>
</li> </li>
@ -966,6 +1070,9 @@
<ul class="tsd-legend"> <ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li> <li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
</ul> </ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
</ul>
</div> </div>
</div> </div>
</footer> </footer>

View File

@ -237,6 +237,9 @@
<ul class="tsd-legend"> <ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li> <li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
</ul> </ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
</ul>
</div> </div>
</div> </div>
</footer> </footer>

View File

@ -236,6 +236,9 @@
<ul class="tsd-legend"> <ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li> <li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
</ul> </ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
</ul>
</div> </div>
</div> </div>
</footer> </footer>

View File

@ -817,6 +817,9 @@
<ul class="tsd-legend"> <ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li> <li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
</ul> </ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
</ul>
</div> </div>
</div> </div>
</footer> </footer>

View File

@ -373,6 +373,9 @@
<ul class="tsd-legend"> <ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li> <li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
</ul> </ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
</ul>
</div> </div>
</div> </div>
</footer> </footer>

View File

@ -415,6 +415,9 @@
<ul class="tsd-legend"> <ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li> <li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
</ul> </ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
</ul>
</div> </div>
</div> </div>
</footer> </footer>

View File

@ -244,6 +244,9 @@
<ul class="tsd-legend"> <ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li> <li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
</ul> </ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
</ul>
</div> </div>
</div> </div>
</footer> </footer>

View File

@ -246,6 +246,9 @@
<ul class="tsd-legend"> <ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li> <li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
</ul> </ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
</ul>
</div> </div>
</div> </div>
</footer> </footer>

View File

@ -272,6 +272,9 @@
<ul class="tsd-legend"> <ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li> <li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
</ul> </ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
</ul>
</div> </div>
</div> </div>
</footer> </footer>

View File

@ -110,7 +110,7 @@
</aside> </aside>
<div class="tsd-comment tsd-typography"> <div class="tsd-comment tsd-typography">
<div class="lead"> <div class="lead">
<p><a href="Body.html">Body</a>: detection &amp; analysis results</p> <p><a href="../classes/Human.html#Body">Body</a>: detection &amp; analysis results</p>
</div> </div>
</div> </div>
</section> </section>
@ -134,7 +134,7 @@
</aside> </aside>
<div class="tsd-comment tsd-typography"> <div class="tsd-comment tsd-typography">
<div class="lead"> <div class="lead">
<p><a href="Face.html">Face</a>: detection &amp; analysis results</p> <p><a href="../classes/Human.html#Face">Face</a>: detection &amp; analysis results</p>
</div> </div>
</div> </div>
</section> </section>
@ -146,7 +146,7 @@
</aside> </aside>
<div class="tsd-comment tsd-typography"> <div class="tsd-comment tsd-typography">
<div class="lead"> <div class="lead">
<p><a href="../index.html#Gesture">Gesture</a>: detection &amp; analysis results</p> <p><a href="../classes/Human.html#Gesture">Gesture</a>: detection &amp; analysis results</p>
</div> </div>
</div> </div>
</section> </section>
@ -158,7 +158,7 @@
</aside> </aside>
<div class="tsd-comment tsd-typography"> <div class="tsd-comment tsd-typography">
<div class="lead"> <div class="lead">
<p><a href="Hand.html">Hand</a>: detection &amp; analysis results</p> <p><a href="../classes/Human.html#Hand">Hand</a>: detection &amp; analysis results</p>
</div> </div>
</div> </div>
</section> </section>
@ -314,6 +314,9 @@
<ul class="tsd-legend"> <ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li> <li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
</ul> </ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
</ul>
</div> </div>
</div> </div>
</footer> </footer>

12
types/src/human.d.ts vendored
View File

@ -2,7 +2,7 @@
* Human main module * Human main module
*/ */
import { Config } from './config'; import { Config } from './config';
import { Result } from './result'; import { Result, Face, Hand, Body, Item, Gesture } from './result';
import * as tf from '../dist/tfjs.esm.js'; import * as tf from '../dist/tfjs.esm.js';
import * as facemesh from './blazeface/facemesh'; import * as facemesh from './blazeface/facemesh';
import * as draw from './draw/draw'; import * as draw from './draw/draw';
@ -78,6 +78,16 @@ export declare class Human {
canvas: typeof draw.canvas; canvas: typeof draw.canvas;
all: typeof draw.all; all: typeof draw.all;
}; };
/** Types used by Human */
static Config: Config;
static Result: Result;
static Face: Face;
static Hand: Hand;
static Body: Body;
static Item: Item;
static Gesture: Gesture;
static Person: Gesture;
static DrawOptions: draw.DrawOptions;
/** @internal: Currently loaded models */ /** @internal: Currently loaded models */
models: { models: {
face: [unknown, GraphModel | null, GraphModel | null] | null; face: [unknown, GraphModel | null, GraphModel | null] | null;