mirror of https://github.com/vladmandic/human
modularize model loading
parent
9caf2f8b77
commit
a251ded89b
|
@ -9,11 +9,11 @@ Repository: **<git+https://github.com/vladmandic/human.git>**
|
|||
|
||||
## Changelog
|
||||
|
||||
### **HEAD -> main** 2021/06/18 mandic00@live.com
|
||||
|
||||
|
||||
### **2.0.3** 2021/06/18 mandic00@live.com
|
||||
|
||||
|
||||
### **origin/main** 2021/06/16 mandic00@live.com
|
||||
|
||||
- fix demo paths
|
||||
- added multithreaded demo
|
||||
|
||||
|
|
|
@ -52,7 +52,6 @@ Check out [**Live Demo**](https://vladmandic.github.io/human/demo/index.html) ap
|
|||
- [**NPM Package**](https://www.npmjs.com/package/@vladmandic/human)
|
||||
- [**Issues Tracker**](https://github.com/vladmandic/human/issues)
|
||||
- [**TypeDoc API Specification: Human**](https://vladmandic.github.io/human/typedoc/classes/human.html)
|
||||
- [**TypeDoc API Specification: Root**](https://vladmandic.github.io/human/typedoc/)
|
||||
- [**Change Log**](https://github.com/vladmandic/human/blob/main/CHANGELOG.md)
|
||||
- [**Current To-do List**](https://github.com/vladmandic/human/blob/main/TODO.md)
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ const ui = {
|
|||
worker: 'index-worker.js',
|
||||
maxFPSframes: 10, // keep fps history for how many frames
|
||||
modelsPreload: true, // preload human models on startup
|
||||
modelsWarmup: true, // warmup human models on startup
|
||||
modelsWarmup: false, // warmup human models on startup
|
||||
buffered: true, // should output be buffered between frames
|
||||
interpolated: true, // should output be interpolated for smoothness between frames
|
||||
iconSize: '48px', // ui icon sizes
|
||||
|
@ -272,7 +272,6 @@ async function drawResults(input) {
|
|||
if (ui.drawThread) {
|
||||
log('stopping buffered refresh');
|
||||
cancelAnimationFrame(ui.drawThread);
|
||||
ui.drawThread = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -421,8 +420,13 @@ function webWorker(input, image, canvas, timestamp) {
|
|||
status();
|
||||
drawResults(input);
|
||||
}
|
||||
// eslint-disable-next-line no-use-before-define
|
||||
ui.detectThread = requestAnimationFrame((now) => runHumanDetect(input, canvas, now));
|
||||
const videoLive = (input.readyState > 2) && (!input.paused);
|
||||
const cameraLive = input.srcObject && (input.srcObject.getVideoTracks()[0].readyState === 'live') && !input.paused;
|
||||
const live = videoLive || cameraLive;
|
||||
if (live) {
|
||||
// eslint-disable-next-line no-use-before-define
|
||||
ui.detectThread = requestAnimationFrame((now) => runHumanDetect(input, canvas, now));
|
||||
}
|
||||
});
|
||||
}
|
||||
// pass image data as arraybuffer to worker by reference to avoid copy
|
||||
|
@ -437,16 +441,12 @@ function runHumanDetect(input, canvas, timestamp) {
|
|||
const live = videoLive || cameraLive;
|
||||
if (!live) {
|
||||
// stop ui refresh
|
||||
if (ui.drawThread) cancelAnimationFrame(ui.drawThread);
|
||||
// if (ui.drawThread) cancelAnimationFrame(ui.drawThread);
|
||||
if (ui.detectThread) cancelAnimationFrame(ui.detectThread);
|
||||
ui.drawThread = null;
|
||||
ui.detectThread = null;
|
||||
// if we want to continue and camera not ready, retry in 0.5sec, else just give up
|
||||
if (input.paused) log('video paused');
|
||||
else if (cameraLive && (input.readyState <= 2)) setTimeout(() => runHumanDetect(input, canvas), 500);
|
||||
else log(`video not ready: track state: ${input.srcObject ? input.srcObject.getVideoTracks()[0].readyState : 'unknown'} stream state: ${input.readyState}`);
|
||||
clearTimeout(ui.drawThread);
|
||||
ui.drawThread = null;
|
||||
log('frame statistics: process:', ui.framesDetect, 'refresh:', ui.framesDraw);
|
||||
log('memory', human.tf.engine().memory());
|
||||
return;
|
||||
|
@ -581,10 +581,12 @@ async function detectVideo() {
|
|||
const video = document.getElementById('video');
|
||||
const canvas = document.getElementById('canvas');
|
||||
canvas.style.display = 'block';
|
||||
cancelAnimationFrame(ui.detectThread);
|
||||
if ((video.srcObject !== null) && !video.paused) {
|
||||
document.getElementById('btnStartText').innerHTML = 'start video';
|
||||
status('paused');
|
||||
video.pause();
|
||||
await video.pause();
|
||||
// if (ui.drawThread) cancelAnimationFrame(ui.drawThread);
|
||||
} else {
|
||||
const cameraError = await setupCamera();
|
||||
if (!cameraError) {
|
||||
|
@ -592,7 +594,7 @@ async function detectVideo() {
|
|||
for (const m of Object.values(menu)) m.hide();
|
||||
document.getElementById('btnStartText').innerHTML = 'pause video';
|
||||
await video.play();
|
||||
if (!ui.detectThread) runHumanDetect(video, canvas);
|
||||
runHumanDetect(video, canvas);
|
||||
} else {
|
||||
status(cameraError);
|
||||
}
|
||||
|
@ -943,6 +945,7 @@ async function main() {
|
|||
// warmup models
|
||||
if (ui.modelsWarmup && !ui.useWorker) {
|
||||
status('initializing');
|
||||
if (!userConfig.warmup || userConfig.warmup === 'none') userConfig.warmup = 'full';
|
||||
const res = await human.warmup(userConfig); // this is not required, just pre-warms all models for faster initial inference
|
||||
if (res && res.canvas && ui.drawWarmup) await drawWarmup(res);
|
||||
}
|
||||
|
|
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
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 it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,22 +1,22 @@
|
|||
2021-06-18 07:23:48 [36mINFO: [39m @vladmandic/human version 2.0.3
|
||||
2021-06-18 07:23:49 [36mINFO: [39m User: vlado Platform: linux Arch: x64 Node: v16.0.0
|
||||
2021-06-18 07:23:49 [36mINFO: [39m Toolchain: {"tfjs":"3.7.0","esbuild":"0.12.9","typescript":"4.3.4","typedoc":"0.21.0","eslint":"7.28.0"}
|
||||
2021-06-18 07:23:49 [36mINFO: [39m Clean: ["dist/*","types/*","typedoc/*"]
|
||||
2021-06-18 07:23:49 [36mINFO: [39m Build: file startup all type: production config: {"minifyWhitespace":true,"minifyIdentifiers":true,"minifySyntax":true}
|
||||
2021-06-18 07:23:49 [35mSTATE:[39m target: node type: tfjs: {"imports":1,"importBytes":102,"outputBytes":1303,"outputFiles":"dist/tfjs.esm.js"}
|
||||
2021-06-18 07:23:49 [35mSTATE:[39m target: node type: node: {"imports":41,"importBytes":430894,"outputBytes":376695,"outputFiles":"dist/human.node.js"}
|
||||
2021-06-18 07:23:49 [35mSTATE:[39m target: nodeGPU type: tfjs: {"imports":1,"importBytes":110,"outputBytes":1311,"outputFiles":"dist/tfjs.esm.js"}
|
||||
2021-06-18 07:23:49 [35mSTATE:[39m target: nodeGPU type: node: {"imports":41,"importBytes":430902,"outputBytes":376699,"outputFiles":"dist/human.node-gpu.js"}
|
||||
2021-06-18 07:23:49 [35mSTATE:[39m target: nodeWASM type: tfjs: {"imports":1,"importBytes":149,"outputBytes":1378,"outputFiles":"dist/tfjs.esm.js"}
|
||||
2021-06-18 07:23:49 [35mSTATE:[39m target: nodeWASM type: node: {"imports":41,"importBytes":430969,"outputBytes":376771,"outputFiles":"dist/human.node-wasm.js"}
|
||||
2021-06-18 07:23:49 [35mSTATE:[39m target: browserNoBundle type: tfjs: {"imports":1,"importBytes":2817,"outputBytes":1214,"outputFiles":"dist/tfjs.esm.js"}
|
||||
2021-06-18 07:23:49 [35mSTATE:[39m target: browserNoBundle type: esm: {"imports":41,"importBytes":430805,"outputBytes":247896,"outputFiles":"dist/human.esm-nobundle.js"}
|
||||
2021-06-18 07:23:49 [35mSTATE:[39m target: browserBundle type: tfjs: {"modules":1684,"moduleBytes":5720339,"imports":7,"importBytes":2817,"outputBytes":2817783,"outputFiles":"dist/tfjs.esm.js"}
|
||||
2021-06-18 07:23:49 [35mSTATE:[39m target: browserBundle type: iife: {"imports":41,"importBytes":3247374,"outputBytes":1588289,"outputFiles":"dist/human.js"}
|
||||
2021-06-18 07:23:50 [35mSTATE:[39m target: browserBundle type: esm: {"imports":41,"importBytes":3247374,"outputBytes":1588281,"outputFiles":"dist/human.esm.js"}
|
||||
2021-06-18 07:23:50 [36mINFO: [39m Running Linter: ["server/","src/","tfjs/","test/","demo/"]
|
||||
2021-06-18 07:24:07 [36mINFO: [39m Linter complete: files: 73 errors: 0 warnings: 0
|
||||
2021-06-18 07:24:07 [36mINFO: [39m Generate ChangeLog: ["/home/vlado/dev/human/CHANGELOG.md"]
|
||||
2021-06-18 07:24:07 [36mINFO: [39m Generate Typings: ["src/human.ts"] outDir: ["types"]
|
||||
2021-06-18 07:24:18 [36mINFO: [39m Generate TypeDocs: ["src/human.ts"] outDir: ["typedoc"]
|
||||
2021-06-18 07:24:27 [36mINFO: [39m Documentation generated at /home/vlado/dev/human/typedoc 1
|
||||
2021-06-18 09:14:08 [36mINFO: [39m @vladmandic/human version 2.0.3
|
||||
2021-06-18 09:14:08 [36mINFO: [39m User: vlado Platform: linux Arch: x64 Node: v16.0.0
|
||||
2021-06-18 09:14:08 [36mINFO: [39m Toolchain: {"tfjs":"3.7.0","esbuild":"0.12.9","typescript":"4.3.4","typedoc":"0.21.0","eslint":"7.28.0"}
|
||||
2021-06-18 09:14:08 [36mINFO: [39m Clean: ["dist/*","types/*","typedoc/*"]
|
||||
2021-06-18 09:14:08 [36mINFO: [39m Build: file startup all type: production config: {"minifyWhitespace":true,"minifyIdentifiers":true,"minifySyntax":true}
|
||||
2021-06-18 09:14:08 [35mSTATE:[39m target: node type: tfjs: {"imports":1,"importBytes":102,"outputBytes":1303,"outputFiles":"dist/tfjs.esm.js"}
|
||||
2021-06-18 09:14:09 [35mSTATE:[39m target: node type: node: {"imports":42,"importBytes":432899,"outputBytes":377119,"outputFiles":"dist/human.node.js"}
|
||||
2021-06-18 09:14:09 [35mSTATE:[39m target: nodeGPU type: tfjs: {"imports":1,"importBytes":110,"outputBytes":1311,"outputFiles":"dist/tfjs.esm.js"}
|
||||
2021-06-18 09:14:09 [35mSTATE:[39m target: nodeGPU type: node: {"imports":42,"importBytes":432907,"outputBytes":377123,"outputFiles":"dist/human.node-gpu.js"}
|
||||
2021-06-18 09:14:09 [35mSTATE:[39m target: nodeWASM type: tfjs: {"imports":1,"importBytes":149,"outputBytes":1378,"outputFiles":"dist/tfjs.esm.js"}
|
||||
2021-06-18 09:14:09 [35mSTATE:[39m target: nodeWASM type: node: {"imports":42,"importBytes":432974,"outputBytes":377195,"outputFiles":"dist/human.node-wasm.js"}
|
||||
2021-06-18 09:14:09 [35mSTATE:[39m target: browserNoBundle type: tfjs: {"imports":1,"importBytes":2817,"outputBytes":1214,"outputFiles":"dist/tfjs.esm.js"}
|
||||
2021-06-18 09:14:09 [35mSTATE:[39m target: browserNoBundle type: esm: {"imports":42,"importBytes":432810,"outputBytes":247617,"outputFiles":"dist/human.esm-nobundle.js"}
|
||||
2021-06-18 09:14:09 [35mSTATE:[39m target: browserBundle type: tfjs: {"modules":1684,"moduleBytes":5720339,"imports":7,"importBytes":2817,"outputBytes":2817783,"outputFiles":"dist/tfjs.esm.js"}
|
||||
2021-06-18 09:14:09 [35mSTATE:[39m target: browserBundle type: iife: {"imports":42,"importBytes":3249379,"outputBytes":1588012,"outputFiles":"dist/human.js"}
|
||||
2021-06-18 09:14:10 [35mSTATE:[39m target: browserBundle type: esm: {"imports":42,"importBytes":3249379,"outputBytes":1588004,"outputFiles":"dist/human.esm.js"}
|
||||
2021-06-18 09:14:10 [36mINFO: [39m Running Linter: ["server/","src/","tfjs/","test/","demo/"]
|
||||
2021-06-18 09:14:27 [36mINFO: [39m Linter complete: files: 74 errors: 0 warnings: 0
|
||||
2021-06-18 09:14:27 [36mINFO: [39m Generate ChangeLog: ["/home/vlado/dev/human/CHANGELOG.md"]
|
||||
2021-06-18 09:14:27 [36mINFO: [39m Generate Typings: ["src/human.ts"] outDir: ["types"]
|
||||
2021-06-18 09:14:37 [36mINFO: [39m Generate TypeDocs: ["src/human.ts"] outDir: ["typedoc"]
|
||||
2021-06-18 09:14:47 [36mINFO: [39m Documentation generated at /home/vlado/dev/human/typedoc 1
|
||||
|
|
|
@ -59,7 +59,7 @@ export async function predict(input: Tensor, config: Config): Promise<Face[]> {
|
|||
return results;
|
||||
}
|
||||
|
||||
export async function load(config): Promise<[unknown, unknown, unknown]> {
|
||||
export async function load(config): Promise<[unknown, GraphModel | null, GraphModel | null]> {
|
||||
if ((!faceModels[0] && config.face.enabled) || (!faceModels[1] && config.face.mesh.enabled) || (!faceModels[2] && config.face.iris.enabled)) {
|
||||
// @ts-ignore type mismatch for GraphModel
|
||||
faceModels = await Promise.all([
|
||||
|
|
|
@ -69,7 +69,7 @@ export async function predict(input: Tensor, config: Config): Promise<Hand[]> {
|
|||
return hands;
|
||||
}
|
||||
|
||||
export async function load(config: Config): Promise<[unknown, unknown]> {
|
||||
export async function load(config: Config): Promise<[GraphModel | null, GraphModel | null]> {
|
||||
if (!handDetectorModel || !handPoseModel) {
|
||||
// @ts-ignore type mismatch on GraphModel
|
||||
[handDetectorModel, handPoseModel] = await Promise.all([
|
||||
|
|
88
src/human.ts
88
src/human.ts
|
@ -8,10 +8,10 @@ import { Result, Gesture } from './result';
|
|||
import * as sysinfo from './sysinfo';
|
||||
import * as tf from '../dist/tfjs.esm.js';
|
||||
import * as backend from './tfjs/backend';
|
||||
import * as models from './models';
|
||||
import * as face from './face';
|
||||
import * as facemesh from './blazeface/facemesh';
|
||||
import * as faceres from './faceres/faceres';
|
||||
import * as emotion from './emotion/emotion';
|
||||
import * as posenet from './posenet/posenet';
|
||||
import * as handpose from './handpose/handpose';
|
||||
import * as blazepose from './blazepose/blazepose';
|
||||
|
@ -19,15 +19,15 @@ import * as efficientpose from './efficientpose/efficientpose';
|
|||
import * as movenet from './movenet/movenet';
|
||||
import * as nanodet from './object/nanodet';
|
||||
import * as centernet from './object/centernet';
|
||||
import * as segmentation from './segmentation/segmentation';
|
||||
import * as gesture from './gesture/gesture';
|
||||
import * as image from './image/image';
|
||||
import * as draw from './draw/draw';
|
||||
import * as persons from './persons';
|
||||
import * as interpolate from './interpolate';
|
||||
import * as segmentation from './segmentation/segmentation';
|
||||
import * as sample from './sample';
|
||||
import * as app from '../package.json';
|
||||
import { Tensor } from './tfjs/types';
|
||||
import { Tensor, GraphModel } from './tfjs/types';
|
||||
|
||||
// export types
|
||||
export type { Config } from './config';
|
||||
|
@ -49,11 +49,6 @@ export type Error = { error: string };
|
|||
*/
|
||||
export type TensorFlow = typeof tf;
|
||||
|
||||
/** Generic Model object type
|
||||
* holds instance of individual models
|
||||
*/
|
||||
type Model = unknown;
|
||||
|
||||
/**
|
||||
* **Human** library main class
|
||||
*
|
||||
|
@ -87,8 +82,8 @@ export class Human {
|
|||
* - Can be embedded or externally provided
|
||||
*/
|
||||
tf: TensorFlow;
|
||||
/** Draw helper classes that can draw detected objects on canvas using specified draw styles
|
||||
* - options: global settings for all draw operations, can be overriden for each draw method, for details see {@link DrawOptions}
|
||||
/** Draw helper classes that can draw detected objects on canvas using specified draw
|
||||
* - options: {@link DrawOptions} global settings for all draw operations, can be overriden for each draw method
|
||||
* - face: draw detected faces
|
||||
* - body: draw detected people and body parts
|
||||
* - hand: draw detected hands and hand parts
|
||||
|
@ -106,20 +101,20 @@ export class Human {
|
|||
};
|
||||
/** @internal: Currently loaded models */
|
||||
models: {
|
||||
face: [Model, Model, Model] | null,
|
||||
posenet: Model | null,
|
||||
blazepose: Model | null,
|
||||
efficientpose: Model | null,
|
||||
movenet: Model | null,
|
||||
handpose: [Model, Model] | null,
|
||||
age: Model | null,
|
||||
gender: Model | null,
|
||||
emotion: Model | null,
|
||||
embedding: Model | null,
|
||||
nanodet: Model | null,
|
||||
centernet: Model | null,
|
||||
faceres: Model | null,
|
||||
segmentation: Model | null,
|
||||
face: [unknown, GraphModel | null, GraphModel | null] | null,
|
||||
posenet: GraphModel | null,
|
||||
blazepose: GraphModel | null,
|
||||
efficientpose: GraphModel | null,
|
||||
movenet: GraphModel | null,
|
||||
handpose: [GraphModel | null, GraphModel | null] | null,
|
||||
age: GraphModel | null,
|
||||
gender: GraphModel | null,
|
||||
emotion: GraphModel | null,
|
||||
embedding: GraphModel | null,
|
||||
nanodet: GraphModel | null,
|
||||
centernet: GraphModel | null,
|
||||
faceres: GraphModel | null,
|
||||
segmentation: GraphModel | null,
|
||||
};
|
||||
/** Reference face triangualtion array of 468 points, used for triangle references between points */
|
||||
faceTriangulation: typeof facemesh.triangulation;
|
||||
|
@ -274,47 +269,8 @@ export class Human {
|
|||
if (this.config.debug) log('tf flags:', this.tf.ENV.flags);
|
||||
}
|
||||
}
|
||||
if (this.config.async) { // load models concurrently
|
||||
[
|
||||
// @ts-ignore async model loading is not correctly inferred
|
||||
this.models.face,
|
||||
this.models.emotion,
|
||||
// @ts-ignore async model loading is not correctly inferred
|
||||
this.models.handpose,
|
||||
this.models.posenet,
|
||||
this.models.blazepose,
|
||||
this.models.efficientpose,
|
||||
this.models.movenet,
|
||||
this.models.nanodet,
|
||||
this.models.centernet,
|
||||
this.models.faceres,
|
||||
this.models.segmentation,
|
||||
] = await Promise.all([
|
||||
this.models.face || (this.config.face.enabled ? facemesh.load(this.config) : null),
|
||||
this.models.emotion || ((this.config.face.enabled && this.config.face.emotion.enabled) ? emotion.load(this.config) : null),
|
||||
this.models.handpose || (this.config.hand.enabled ? handpose.load(this.config) : null),
|
||||
this.models.posenet || (this.config.body.enabled && this.config.body.modelPath.includes('posenet') ? posenet.load(this.config) : null),
|
||||
this.models.blazepose || (this.config.body.enabled && this.config.body.modelPath.includes('blazepose') ? blazepose.load(this.config) : null),
|
||||
this.models.efficientpose || (this.config.body.enabled && this.config.body.modelPath.includes('efficientpose') ? efficientpose.load(this.config) : null),
|
||||
this.models.movenet || (this.config.body.enabled && this.config.body.modelPath.includes('movenet') ? movenet.load(this.config) : null),
|
||||
this.models.nanodet || (this.config.object.enabled && this.config.object.modelPath.includes('nanodet') ? nanodet.load(this.config) : null),
|
||||
this.models.centernet || (this.config.object.enabled && this.config.object.modelPath.includes('centernet') ? centernet.load(this.config) : null),
|
||||
this.models.faceres || ((this.config.face.enabled && this.config.face.description.enabled) ? faceres.load(this.config) : null),
|
||||
this.models.segmentation || (this.config.segmentation.enabled ? segmentation.load(this.config) : null),
|
||||
]);
|
||||
} else { // load models sequentially
|
||||
if (this.config.face.enabled && !this.models.face) this.models.face = await facemesh.load(this.config);
|
||||
if (this.config.face.enabled && this.config.face.emotion.enabled && !this.models.emotion) this.models.emotion = await emotion.load(this.config);
|
||||
if (this.config.hand.enabled && !this.models.handpose) this.models.handpose = await handpose.load(this.config);
|
||||
if (this.config.body.enabled && !this.models.posenet && this.config.body.modelPath.includes('posenet')) this.models.posenet = await posenet.load(this.config);
|
||||
if (this.config.body.enabled && !this.models.blazepose && this.config.body.modelPath.includes('blazepose')) this.models.blazepose = await blazepose.load(this.config);
|
||||
if (this.config.body.enabled && !this.models.efficientpose && this.config.body.modelPath.includes('efficientpose')) this.models.efficientpose = await blazepose.load(this.config);
|
||||
if (this.config.body.enabled && !this.models.movenet && this.config.body.modelPath.includes('movenet')) this.models.movenet = await movenet.load(this.config);
|
||||
if (this.config.object.enabled && !this.models.nanodet && this.config.object.modelPath.includes('nanodet')) this.models.nanodet = await nanodet.load(this.config);
|
||||
if (this.config.object.enabled && !this.models.centernet && this.config.object.modelPath.includes('centernet')) this.models.centernet = await centernet.load(this.config);
|
||||
if (this.config.face.enabled && this.config.face.description.enabled && !this.models.faceres) this.models.faceres = await faceres.load(this.config);
|
||||
if (this.config.segmentation.enabled && !this.models.segmentation) this.models.segmentation = await segmentation.load(this.config);
|
||||
}
|
||||
|
||||
await models.load(this); // actually loads models
|
||||
|
||||
if (this.#firstRun) { // print memory stats on first run
|
||||
if (this.config.debug) log('tf engine state:', this.tf.engine().state.numBytes, 'bytes', this.tf.engine().state.numTensors, 'tensors');
|
||||
|
@ -695,7 +651,7 @@ export class Human {
|
|||
return res;
|
||||
}
|
||||
|
||||
/** Warmup metho pre-initializes all models for faster inference
|
||||
/** Warmup method pre-initializes all configured models for faster inference
|
||||
* - can take significant time on startup
|
||||
* - only used for `webgl` and `humangl` backends
|
||||
* @param userConfig?: Config
|
||||
|
|
|
@ -0,0 +1,68 @@
|
|||
import * as facemesh from './blazeface/facemesh';
|
||||
import * as faceres from './faceres/faceres';
|
||||
import * as emotion from './emotion/emotion';
|
||||
import * as posenet from './posenet/posenet';
|
||||
import * as handpose from './handpose/handpose';
|
||||
import * as blazepose from './blazepose/blazepose';
|
||||
import * as efficientpose from './efficientpose/efficientpose';
|
||||
import * as movenet from './movenet/movenet';
|
||||
import * as nanodet from './object/nanodet';
|
||||
import * as centernet from './object/centernet';
|
||||
import * as segmentation from './segmentation/segmentation';
|
||||
|
||||
/** Load method preloads all instance.configured models on-demand
|
||||
* - Not explicitly required as any required model is load implicitly on it's first run
|
||||
* @param userinstance.config?: {@link instance.config}
|
||||
*/
|
||||
export async function load(instance) {
|
||||
if (instance.config.async) { // load models concurrently
|
||||
[
|
||||
// @ts-ignore models loaded via promise array cannot be correctly inferred
|
||||
instance.models.face,
|
||||
// @ts-ignore models loaded via promise array cannot be correctly inferred
|
||||
instance.models.emotion,
|
||||
// @ts-ignore models loaded via promise array cannot be correctly inferred
|
||||
instance.models.handpose,
|
||||
// @ts-ignore models loaded via promise array cannot be correctly inferred
|
||||
instance.models.posenet,
|
||||
// @ts-ignore models loaded via promise array cannot be correctly inferred
|
||||
instance.models.blazepose,
|
||||
// @ts-ignore models loaded via promise array cannot be correctly inferred
|
||||
instance.models.efficientpose,
|
||||
// @ts-ignore models loaded via promise array cannot be correctly inferred
|
||||
instance.models.movenet,
|
||||
// @ts-ignore models loaded via promise array cannot be correctly inferred
|
||||
instance.models.nanodet,
|
||||
// @ts-ignore models loaded via promise array cannot be correctly inferred
|
||||
instance.models.centernet,
|
||||
// @ts-ignore models loaded via promise array cannot be correctly inferred
|
||||
instance.models.faceres,
|
||||
// @ts-ignore models loaded via promise array cannot be correctly inferred
|
||||
instance.models.segmentation,
|
||||
] = await Promise.all([
|
||||
instance.models.face || (instance.config.face.enabled ? facemesh.load(instance.config) : null),
|
||||
instance.models.emotion || ((instance.config.face.enabled && instance.config.face.emotion.enabled) ? emotion.load(instance.config) : null),
|
||||
instance.models.handpose || (instance.config.hand.enabled ? handpose.load(instance.config) : null),
|
||||
instance.models.posenet || (instance.config.body.enabled && instance.config.body.modelPath.includes('posenet') ? posenet.load(instance.config) : null),
|
||||
instance.models.blazepose || (instance.config.body.enabled && instance.config.body.modelPath.includes('blazepose') ? blazepose.load(instance.config) : null),
|
||||
instance.models.efficientpose || (instance.config.body.enabled && instance.config.body.modelPath.includes('efficientpose') ? efficientpose.load(instance.config) : null),
|
||||
instance.models.movenet || (instance.config.body.enabled && instance.config.body.modelPath.includes('movenet') ? movenet.load(instance.config) : null),
|
||||
instance.models.nanodet || (instance.config.object.enabled && instance.config.object.modelPath.includes('nanodet') ? nanodet.load(instance.config) : null),
|
||||
instance.models.centernet || (instance.config.object.enabled && instance.config.object.modelPath.includes('centernet') ? centernet.load(instance.config) : null),
|
||||
instance.models.faceres || ((instance.config.face.enabled && instance.config.face.description.enabled) ? faceres.load(instance.config) : null),
|
||||
instance.models.segmentation || (instance.config.segmentation.enabled ? segmentation.load(instance.config) : null),
|
||||
]);
|
||||
} else { // load models sequentially
|
||||
if (instance.config.face.enabled && !instance.models.face) instance.models.face = await facemesh.load(instance.config);
|
||||
if (instance.config.face.enabled && instance.config.face.emotion.enabled && !instance.models.emotion) instance.models.emotion = await emotion.load(instance.config);
|
||||
if (instance.config.hand.enabled && !instance.models.handpose) instance.models.handpose = await handpose.load(instance.config);
|
||||
if (instance.config.body.enabled && !instance.models.posenet && instance.config.body.modelPath.includes('posenet')) instance.models.posenet = await posenet.load(instance.config);
|
||||
if (instance.config.body.enabled && !instance.models.blazepose && instance.config.body.modelPath.includes('blazepose')) instance.models.blazepose = await blazepose.load(instance.config);
|
||||
if (instance.config.body.enabled && !instance.models.efficientpose && instance.config.body.modelPath.includes('efficientpose')) instance.models.efficientpose = await blazepose.load(instance.config);
|
||||
if (instance.config.body.enabled && !instance.models.movenet && instance.config.body.modelPath.includes('movenet')) instance.models.movenet = await movenet.load(instance.config);
|
||||
if (instance.config.object.enabled && !instance.models.nanodet && instance.config.object.modelPath.includes('nanodet')) instance.models.nanodet = await nanodet.load(instance.config);
|
||||
if (instance.config.object.enabled && !instance.models.centernet && instance.config.object.modelPath.includes('centernet')) instance.models.centernet = await centernet.load(instance.config);
|
||||
if (instance.config.face.enabled && instance.config.face.description.enabled && !instance.models.faceres) instance.models.faceres = await faceres.load(instance.config);
|
||||
if (instance.config.segmentation.enabled && !instance.models.segmentation) instance.models.segmentation = await segmentation.load(instance.config);
|
||||
}
|
||||
}
|
338
test/test.log
338
test/test.log
|
@ -1,169 +1,169 @@
|
|||
2021-06-18 07:20:42 [36mINFO: [39m @vladmandic/human version 2.0.3
|
||||
2021-06-18 07:20:42 [36mINFO: [39m User: vlado Platform: linux Arch: x64 Node: v16.0.0
|
||||
2021-06-18 07:20:42 [36mINFO: [39m tests: ["test-node.js","test-node-gpu.js","test-node-wasm.js"]
|
||||
2021-06-18 07:20:42 [36mINFO: [39m test-node.js start
|
||||
2021-06-18 07:20:42 [35mSTATE:[39m test-node.js passed: create human
|
||||
2021-06-18 07:20:42 [36mINFO: [39m test-node.js human version: 2.0.3
|
||||
2021-06-18 07:20:42 [36mINFO: [39m test-node.js platform: linux x64 agent: NodeJS v16.0.0
|
||||
2021-06-18 07:20:42 [36mINFO: [39m test-node.js tfjs version: 3.7.0
|
||||
2021-06-18 07:20:43 [35mSTATE:[39m test-node.js passed: set backend: tensorflow
|
||||
2021-06-18 07:20:43 [35mSTATE:[39m test-node.js passed: load models
|
||||
2021-06-18 07:20:43 [35mSTATE:[39m test-node.js result: defined models: 14 loaded models: 7
|
||||
2021-06-18 07:20:43 [35mSTATE:[39m test-node.js passed: warmup: none default
|
||||
2021-06-18 07:20:43 [35mSTATE:[39m test-node.js passed: warmup: face default
|
||||
2021-06-18 07:20:43 [32mDATA: [39m 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.73,"keypoints":5}
|
||||
2021-06-18 07:20:43 [32mDATA: [39m test-node.js result: performance: load: 212 total: 780
|
||||
2021-06-18 07:20:44 [35mSTATE:[39m test-node.js passed: warmup: body default
|
||||
2021-06-18 07:20:44 [32mDATA: [39m 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.93,"keypoints":17}
|
||||
2021-06-18 07:20:44 [32mDATA: [39m test-node.js result: performance: load: 212 total: 728
|
||||
2021-06-18 07:20:44 [36mINFO: [39m test-node.js test body variants
|
||||
2021-06-18 07:20:45 [35mSTATE:[39m test-node.js passed: load image: samples/ai-body.jpg [1,1200,1200,3]
|
||||
2021-06-18 07:20:45 [35mSTATE:[39m test-node.js passed: detect: samples/ai-body.jpg posenet
|
||||
2021-06-18 07:20:45 [32mDATA: [39m 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-06-18 07:20:45 [32mDATA: [39m test-node.js result: performance: load: 212 total: 539
|
||||
2021-06-18 07:20:46 [35mSTATE:[39m test-node.js passed: load image: samples/ai-body.jpg [1,1200,1200,3]
|
||||
2021-06-18 07:20:46 [35mSTATE:[39m test-node.js passed: detect: samples/ai-body.jpg movenet
|
||||
2021-06-18 07:20:46 [32mDATA: [39m 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.93,"keypoints":17}
|
||||
2021-06-18 07:20:46 [32mDATA: [39m test-node.js result: performance: load: 212 total: 138
|
||||
2021-06-18 07:20:47 [35mSTATE:[39m test-node.js passed: detect: random default
|
||||
2021-06-18 07:20:47 [32mDATA: [39m test-node.js result: face: 0 body: 1 hand: 0 gesture: 0 object: 0 person: 0 {} {} {"score":0,"keypoints":0}
|
||||
2021-06-18 07:20:47 [32mDATA: [39m test-node.js result: performance: load: 212 total: 402
|
||||
2021-06-18 07:20:47 [36mINFO: [39m test-node.js test: first instance
|
||||
2021-06-18 07:20:47 [35mSTATE:[39m test-node.js passed: load image: samples/ai-upper.jpg [1,720,688,3]
|
||||
2021-06-18 07:20:48 [35mSTATE:[39m test-node.js passed: detect: samples/ai-upper.jpg default
|
||||
2021-06-18 07:20:48 [32mDATA: [39m 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.78,"keypoints":7}
|
||||
2021-06-18 07:20:48 [32mDATA: [39m test-node.js result: performance: load: 212 total: 568
|
||||
2021-06-18 07:20:48 [36mINFO: [39m test-node.js test: second instance
|
||||
2021-06-18 07:20:48 [35mSTATE:[39m test-node.js passed: load image: samples/ai-upper.jpg [1,720,688,3]
|
||||
2021-06-18 07:20:48 [35mSTATE:[39m test-node.js passed: detect: samples/ai-upper.jpg default
|
||||
2021-06-18 07:20:48 [32mDATA: [39m 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.78,"keypoints":7}
|
||||
2021-06-18 07:20:48 [32mDATA: [39m test-node.js result: performance: load: 1 total: 587
|
||||
2021-06-18 07:20:48 [36mINFO: [39m test-node.js test: concurrent
|
||||
2021-06-18 07:20:48 [35mSTATE:[39m test-node.js passed: load image: samples/ai-face.jpg [1,256,256,3]
|
||||
2021-06-18 07:20:48 [35mSTATE:[39m test-node.js passed: load image: samples/ai-face.jpg [1,256,256,3]
|
||||
2021-06-18 07:20:49 [35mSTATE:[39m test-node.js passed: load image: samples/ai-body.jpg [1,1200,1200,3]
|
||||
2021-06-18 07:20:50 [35mSTATE:[39m test-node.js passed: load image: samples/ai-body.jpg [1,1200,1200,3]
|
||||
2021-06-18 07:20:52 [35mSTATE:[39m test-node.js passed: detect: samples/ai-face.jpg default
|
||||
2021-06-18 07:20:52 [32mDATA: [39m 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.73,"keypoints":17}
|
||||
2021-06-18 07:20:52 [32mDATA: [39m test-node.js result: performance: load: 212 total: 2523
|
||||
2021-06-18 07:20:52 [35mSTATE:[39m test-node.js passed: detect: samples/ai-face.jpg default
|
||||
2021-06-18 07:20:52 [32mDATA: [39m 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.73,"keypoints":17}
|
||||
2021-06-18 07:20:52 [32mDATA: [39m test-node.js result: performance: load: 1 total: 2523
|
||||
2021-06-18 07:20:52 [35mSTATE:[39m test-node.js passed: detect: samples/ai-body.jpg default
|
||||
2021-06-18 07:20:52 [32mDATA: [39m 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.93,"keypoints":17}
|
||||
2021-06-18 07:20:52 [32mDATA: [39m test-node.js result: performance: load: 212 total: 2523
|
||||
2021-06-18 07:20:52 [35mSTATE:[39m test-node.js passed: detect: samples/ai-body.jpg default
|
||||
2021-06-18 07:20:52 [32mDATA: [39m 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.93,"keypoints":17}
|
||||
2021-06-18 07:20:52 [32mDATA: [39m test-node.js result: performance: load: 1 total: 2523
|
||||
2021-06-18 07:20:52 [36mINFO: [39m test-node.js test complete: 9786 ms
|
||||
2021-06-18 07:20:52 [36mINFO: [39m test-node-gpu.js start
|
||||
2021-06-18 07:20:53 [33mWARN: [39m test-node-gpu.js stderr: 2021-06-18 07:20:53.148859: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] 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-06-18 07:20:53 [33mWARN: [39m test-node-gpu.js stderr: 2021-06-18 07:20:53.184866: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory
|
||||
2021-06-18 07:20:53 [33mWARN: [39m test-node-gpu.js stderr: 2021-06-18 07:20:53.184909: 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-06-18 07:20:53 [35mSTATE:[39m test-node-gpu.js passed: create human
|
||||
2021-06-18 07:20:53 [36mINFO: [39m test-node-gpu.js human version: 2.0.3
|
||||
2021-06-18 07:20:53 [36mINFO: [39m test-node-gpu.js platform: linux x64 agent: NodeJS v16.0.0
|
||||
2021-06-18 07:20:53 [36mINFO: [39m test-node-gpu.js tfjs version: 3.7.0
|
||||
2021-06-18 07:20:53 [35mSTATE:[39m test-node-gpu.js passed: set backend: tensorflow
|
||||
2021-06-18 07:20:53 [35mSTATE:[39m test-node-gpu.js passed: load models
|
||||
2021-06-18 07:20:53 [35mSTATE:[39m test-node-gpu.js result: defined models: 14 loaded models: 7
|
||||
2021-06-18 07:20:53 [35mSTATE:[39m test-node-gpu.js passed: warmup: none default
|
||||
2021-06-18 07:20:54 [35mSTATE:[39m test-node-gpu.js passed: warmup: face default
|
||||
2021-06-18 07:20:54 [32mDATA: [39m 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.73,"keypoints":5}
|
||||
2021-06-18 07:20:54 [32mDATA: [39m test-node-gpu.js result: performance: load: 225 total: 753
|
||||
2021-06-18 07:20:54 [35mSTATE:[39m test-node-gpu.js passed: warmup: body default
|
||||
2021-06-18 07:20:54 [32mDATA: [39m 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.93,"keypoints":17}
|
||||
2021-06-18 07:20:54 [32mDATA: [39m test-node-gpu.js result: performance: load: 225 total: 726
|
||||
2021-06-18 07:20:54 [36mINFO: [39m test-node-gpu.js test body variants
|
||||
2021-06-18 07:20:55 [35mSTATE:[39m test-node-gpu.js passed: load image: samples/ai-body.jpg [1,1200,1200,3]
|
||||
2021-06-18 07:20:56 [35mSTATE:[39m test-node-gpu.js passed: detect: samples/ai-body.jpg posenet
|
||||
2021-06-18 07:20:56 [32mDATA: [39m 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-06-18 07:20:56 [32mDATA: [39m test-node-gpu.js result: performance: load: 225 total: 539
|
||||
2021-06-18 07:20:56 [35mSTATE:[39m test-node-gpu.js passed: load image: samples/ai-body.jpg [1,1200,1200,3]
|
||||
2021-06-18 07:20:56 [35mSTATE:[39m test-node-gpu.js passed: detect: samples/ai-body.jpg movenet
|
||||
2021-06-18 07:20:56 [32mDATA: [39m 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.93,"keypoints":17}
|
||||
2021-06-18 07:20:56 [32mDATA: [39m test-node-gpu.js result: performance: load: 225 total: 136
|
||||
2021-06-18 07:20:57 [35mSTATE:[39m test-node-gpu.js passed: detect: random default
|
||||
2021-06-18 07:20:57 [32mDATA: [39m test-node-gpu.js result: face: 0 body: 1 hand: 0 gesture: 0 object: 0 person: 0 {} {} {"score":0,"keypoints":0}
|
||||
2021-06-18 07:20:57 [32mDATA: [39m test-node-gpu.js result: performance: load: 225 total: 404
|
||||
2021-06-18 07:20:57 [36mINFO: [39m test-node-gpu.js test: first instance
|
||||
2021-06-18 07:20:57 [35mSTATE:[39m test-node-gpu.js passed: load image: samples/ai-upper.jpg [1,720,688,3]
|
||||
2021-06-18 07:20:58 [35mSTATE:[39m test-node-gpu.js passed: detect: samples/ai-upper.jpg default
|
||||
2021-06-18 07:20:58 [32mDATA: [39m 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.78,"keypoints":7}
|
||||
2021-06-18 07:20:58 [32mDATA: [39m test-node-gpu.js result: performance: load: 225 total: 615
|
||||
2021-06-18 07:20:58 [36mINFO: [39m test-node-gpu.js test: second instance
|
||||
2021-06-18 07:20:58 [35mSTATE:[39m test-node-gpu.js passed: load image: samples/ai-upper.jpg [1,720,688,3]
|
||||
2021-06-18 07:20:59 [35mSTATE:[39m test-node-gpu.js passed: detect: samples/ai-upper.jpg default
|
||||
2021-06-18 07:20:59 [32mDATA: [39m 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.78,"keypoints":7}
|
||||
2021-06-18 07:20:59 [32mDATA: [39m test-node-gpu.js result: performance: load: 3 total: 627
|
||||
2021-06-18 07:20:59 [36mINFO: [39m test-node-gpu.js test: concurrent
|
||||
2021-06-18 07:20:59 [35mSTATE:[39m test-node-gpu.js passed: load image: samples/ai-face.jpg [1,256,256,3]
|
||||
2021-06-18 07:20:59 [35mSTATE:[39m test-node-gpu.js passed: load image: samples/ai-face.jpg [1,256,256,3]
|
||||
2021-06-18 07:20:59 [35mSTATE:[39m test-node-gpu.js passed: load image: samples/ai-body.jpg [1,1200,1200,3]
|
||||
2021-06-18 07:21:00 [35mSTATE:[39m test-node-gpu.js passed: load image: samples/ai-body.jpg [1,1200,1200,3]
|
||||
2021-06-18 07:21:03 [35mSTATE:[39m test-node-gpu.js passed: detect: samples/ai-face.jpg default
|
||||
2021-06-18 07:21:03 [32mDATA: [39m 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.73,"keypoints":17}
|
||||
2021-06-18 07:21:03 [32mDATA: [39m test-node-gpu.js result: performance: load: 225 total: 2582
|
||||
2021-06-18 07:21:03 [35mSTATE:[39m test-node-gpu.js passed: detect: samples/ai-face.jpg default
|
||||
2021-06-18 07:21:03 [32mDATA: [39m 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.73,"keypoints":17}
|
||||
2021-06-18 07:21:03 [32mDATA: [39m test-node-gpu.js result: performance: load: 3 total: 2582
|
||||
2021-06-18 07:21:03 [35mSTATE:[39m test-node-gpu.js passed: detect: samples/ai-body.jpg default
|
||||
2021-06-18 07:21:03 [32mDATA: [39m 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.93,"keypoints":17}
|
||||
2021-06-18 07:21:03 [32mDATA: [39m test-node-gpu.js result: performance: load: 225 total: 2582
|
||||
2021-06-18 07:21:03 [35mSTATE:[39m test-node-gpu.js passed: detect: samples/ai-body.jpg default
|
||||
2021-06-18 07:21:03 [32mDATA: [39m 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.93,"keypoints":17}
|
||||
2021-06-18 07:21:03 [32mDATA: [39m test-node-gpu.js result: performance: load: 3 total: 2582
|
||||
2021-06-18 07:21:03 [36mINFO: [39m test-node-gpu.js test complete: 9935 ms
|
||||
2021-06-18 07:21:03 [36mINFO: [39m test-node-wasm.js start
|
||||
2021-06-18 07:21:03 [35mSTATE:[39m test-node-wasm.js passed: model server: http://localhost:10030/models/
|
||||
2021-06-18 07:21:03 [35mSTATE:[39m test-node-wasm.js passed: create human
|
||||
2021-06-18 07:21:03 [36mINFO: [39m test-node-wasm.js human version: 2.0.3
|
||||
2021-06-18 07:21:03 [36mINFO: [39m test-node-wasm.js platform: linux x64 agent: NodeJS v16.0.0
|
||||
2021-06-18 07:21:03 [36mINFO: [39m test-node-wasm.js tfjs version: 3.7.0
|
||||
2021-06-18 07:21:03 [35mSTATE:[39m test-node-wasm.js passed: set backend: wasm
|
||||
2021-06-18 07:21:03 [35mSTATE:[39m test-node-wasm.js passed: load models
|
||||
2021-06-18 07:21:03 [35mSTATE:[39m test-node-wasm.js result: defined models: 14 loaded models: 6
|
||||
2021-06-18 07:21:03 [35mSTATE:[39m test-node-wasm.js passed: warmup: none default
|
||||
2021-06-18 07:21:03 [31mERROR:[39m test-node-wasm.js failed: warmup: face default
|
||||
2021-06-18 07:21:03 [31mERROR:[39m test-node-wasm.js failed: warmup: body default
|
||||
2021-06-18 07:21:03 [36mINFO: [39m test-node-wasm.js test body variants
|
||||
2021-06-18 07:21:05 [35mSTATE:[39m test-node-wasm.js passed: load image: samples/ai-body.jpg [1,1200,1200,3]
|
||||
2021-06-18 07:21:07 [35mSTATE:[39m test-node-wasm.js passed: detect: samples/ai-body.jpg posenet
|
||||
2021-06-18 07:21:07 [32mDATA: [39m 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-06-18 07:21:07 [32mDATA: [39m test-node-wasm.js result: performance: load: 404 total: 2180
|
||||
2021-06-18 07:21:08 [35mSTATE:[39m test-node-wasm.js passed: load image: samples/ai-body.jpg [1,1200,1200,3]
|
||||
2021-06-18 07:21:09 [35mSTATE:[39m test-node-wasm.js passed: detect: samples/ai-body.jpg movenet
|
||||
2021-06-18 07:21:09 [32mDATA: [39m test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 0 person: 1 {"age":28.5,"gender":"female"} {} {"score":0.93,"keypoints":17}
|
||||
2021-06-18 07:21:09 [32mDATA: [39m test-node-wasm.js result: performance: load: 404 total: 1389
|
||||
2021-06-18 07:21:10 [35mSTATE:[39m test-node-wasm.js passed: detect: random default
|
||||
2021-06-18 07:21:10 [32mDATA: [39m test-node-wasm.js result: face: 0 body: 1 hand: 0 gesture: 1 object: 0 person: 0 {} {} {"score":0.93,"keypoints":17}
|
||||
2021-06-18 07:21:10 [32mDATA: [39m test-node-wasm.js result: performance: load: 404 total: 100
|
||||
2021-06-18 07:21:10 [36mINFO: [39m test-node-wasm.js test: first instance
|
||||
2021-06-18 07:21:10 [35mSTATE:[39m test-node-wasm.js passed: load image: samples/ai-upper.jpg [1,720,688,3]
|
||||
2021-06-18 07:21:10 [35mSTATE:[39m test-node-wasm.js passed: detect: samples/ai-upper.jpg default
|
||||
2021-06-18 07:21:10 [32mDATA: [39m test-node-wasm.js result: face: 0 body: 1 hand: 0 gesture: 1 object: 0 person: 0 {} {} {"score":0.78,"keypoints":7}
|
||||
2021-06-18 07:21:10 [32mDATA: [39m test-node-wasm.js result: performance: load: 404 total: 218
|
||||
2021-06-18 07:21:10 [36mINFO: [39m test-node-wasm.js test: second instance
|
||||
2021-06-18 07:21:11 [35mSTATE:[39m test-node-wasm.js passed: load image: samples/ai-upper.jpg [1,720,688,3]
|
||||
2021-06-18 07:21:12 [35mSTATE:[39m test-node-wasm.js passed: detect: samples/ai-upper.jpg default
|
||||
2021-06-18 07:21:12 [32mDATA: [39m test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 0 person: 1 {"age":29.5,"gender":"female"} {} {"score":0.78,"keypoints":7}
|
||||
2021-06-18 07:21:12 [32mDATA: [39m test-node-wasm.js result: performance: load: 3 total: 1569
|
||||
2021-06-18 07:21:12 [36mINFO: [39m test-node-wasm.js test: concurrent
|
||||
2021-06-18 07:21:12 [35mSTATE:[39m test-node-wasm.js passed: load image: samples/ai-face.jpg [1,256,256,3]
|
||||
2021-06-18 07:21:12 [35mSTATE:[39m test-node-wasm.js passed: load image: samples/ai-face.jpg [1,256,256,3]
|
||||
2021-06-18 07:21:13 [35mSTATE:[39m test-node-wasm.js passed: load image: samples/ai-body.jpg [1,1200,1200,3]
|
||||
2021-06-18 07:21:15 [35mSTATE:[39m test-node-wasm.js passed: load image: samples/ai-body.jpg [1,1200,1200,3]
|
||||
2021-06-18 07:21:21 [35mSTATE:[39m test-node-wasm.js passed: detect: samples/ai-face.jpg default
|
||||
2021-06-18 07:21:21 [32mDATA: [39m test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 0 person: 1 {"age":23.6,"gender":"female"} {} {"score":0.73,"keypoints":17}
|
||||
2021-06-18 07:21:21 [32mDATA: [39m test-node-wasm.js result: performance: load: 404 total: 6225
|
||||
2021-06-18 07:21:21 [35mSTATE:[39m test-node-wasm.js passed: detect: samples/ai-face.jpg default
|
||||
2021-06-18 07:21:21 [32mDATA: [39m test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 0 person: 1 {"age":23.6,"gender":"female"} {} {"score":0.73,"keypoints":17}
|
||||
2021-06-18 07:21:21 [32mDATA: [39m test-node-wasm.js result: performance: load: 3 total: 6225
|
||||
2021-06-18 07:21:21 [35mSTATE:[39m test-node-wasm.js passed: detect: samples/ai-body.jpg default
|
||||
2021-06-18 07:21:21 [32mDATA: [39m test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 0 person: 1 {"age":28.5,"gender":"female"} {} {"score":0.93,"keypoints":17}
|
||||
2021-06-18 07:21:21 [32mDATA: [39m test-node-wasm.js result: performance: load: 404 total: 6225
|
||||
2021-06-18 07:21:21 [35mSTATE:[39m test-node-wasm.js passed: detect: samples/ai-body.jpg default
|
||||
2021-06-18 07:21:21 [32mDATA: [39m test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 0 person: 1 {"age":28.5,"gender":"female"} {} {"score":0.93,"keypoints":17}
|
||||
2021-06-18 07:21:21 [32mDATA: [39m test-node-wasm.js result: performance: load: 3 total: 6225
|
||||
2021-06-18 07:21:21 [36mINFO: [39m test-node-wasm.js test complete: 17896 ms
|
||||
2021-06-18 07:21:21 [36mINFO: [39m status: {"passed":68,"failed":2}
|
||||
2021-06-18 09:14:49 [36mINFO: [39m @vladmandic/human version 2.0.3
|
||||
2021-06-18 09:14:49 [36mINFO: [39m User: vlado Platform: linux Arch: x64 Node: v16.0.0
|
||||
2021-06-18 09:14:49 [36mINFO: [39m tests: ["test-node.js","test-node-gpu.js","test-node-wasm.js"]
|
||||
2021-06-18 09:14:49 [36mINFO: [39m test-node.js start
|
||||
2021-06-18 09:14:51 [35mSTATE:[39m test-node.js passed: create human
|
||||
2021-06-18 09:14:51 [36mINFO: [39m test-node.js human version: 2.0.3
|
||||
2021-06-18 09:14:51 [36mINFO: [39m test-node.js platform: linux x64 agent: NodeJS v16.0.0
|
||||
2021-06-18 09:14:51 [36mINFO: [39m test-node.js tfjs version: 3.7.0
|
||||
2021-06-18 09:14:51 [35mSTATE:[39m test-node.js passed: set backend: tensorflow
|
||||
2021-06-18 09:14:51 [35mSTATE:[39m test-node.js passed: load models
|
||||
2021-06-18 09:14:51 [35mSTATE:[39m test-node.js result: defined models: 14 loaded models: 7
|
||||
2021-06-18 09:14:51 [35mSTATE:[39m test-node.js passed: warmup: none default
|
||||
2021-06-18 09:14:52 [35mSTATE:[39m test-node.js passed: warmup: face default
|
||||
2021-06-18 09:14:52 [32mDATA: [39m 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.73,"keypoints":5}
|
||||
2021-06-18 09:14:52 [32mDATA: [39m test-node.js result: performance: load: 210 total: 870
|
||||
2021-06-18 09:14:52 [35mSTATE:[39m test-node.js passed: warmup: body default
|
||||
2021-06-18 09:14:52 [32mDATA: [39m 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.93,"keypoints":17}
|
||||
2021-06-18 09:14:52 [32mDATA: [39m test-node.js result: performance: load: 210 total: 728
|
||||
2021-06-18 09:14:52 [36mINFO: [39m test-node.js test body variants
|
||||
2021-06-18 09:14:53 [35mSTATE:[39m test-node.js passed: load image: samples/ai-body.jpg [1,1200,1200,3]
|
||||
2021-06-18 09:14:54 [35mSTATE:[39m test-node.js passed: detect: samples/ai-body.jpg posenet
|
||||
2021-06-18 09:14:54 [32mDATA: [39m 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-06-18 09:14:54 [32mDATA: [39m test-node.js result: performance: load: 210 total: 512
|
||||
2021-06-18 09:14:54 [35mSTATE:[39m test-node.js passed: load image: samples/ai-body.jpg [1,1200,1200,3]
|
||||
2021-06-18 09:14:54 [35mSTATE:[39m test-node.js passed: detect: samples/ai-body.jpg movenet
|
||||
2021-06-18 09:14:54 [32mDATA: [39m 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.93,"keypoints":17}
|
||||
2021-06-18 09:14:54 [32mDATA: [39m test-node.js result: performance: load: 210 total: 137
|
||||
2021-06-18 09:14:55 [35mSTATE:[39m test-node.js passed: detect: random default
|
||||
2021-06-18 09:14:55 [32mDATA: [39m 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-06-18 09:14:55 [32mDATA: [39m test-node.js result: performance: load: 210 total: 114
|
||||
2021-06-18 09:14:55 [36mINFO: [39m test-node.js test: first instance
|
||||
2021-06-18 09:14:55 [35mSTATE:[39m test-node.js passed: load image: samples/ai-upper.jpg [1,720,688,3]
|
||||
2021-06-18 09:14:55 [35mSTATE:[39m test-node.js passed: detect: samples/ai-upper.jpg default
|
||||
2021-06-18 09:14:55 [32mDATA: [39m test-node.js result: face: 0 body: 1 hand: 0 gesture: 1 object: 1 person: 0 {} {"score":0.72,"class":"person"} {"score":0.78,"keypoints":7}
|
||||
2021-06-18 09:14:55 [32mDATA: [39m test-node.js result: performance: load: 210 total: 96
|
||||
2021-06-18 09:14:55 [36mINFO: [39m test-node.js test: second instance
|
||||
2021-06-18 09:14:55 [35mSTATE:[39m test-node.js passed: load image: samples/ai-upper.jpg [1,720,688,3]
|
||||
2021-06-18 09:14:56 [35mSTATE:[39m test-node.js passed: detect: samples/ai-upper.jpg default
|
||||
2021-06-18 09:14:56 [32mDATA: [39m 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.78,"keypoints":7}
|
||||
2021-06-18 09:14:56 [32mDATA: [39m test-node.js result: performance: load: 3 total: 624
|
||||
2021-06-18 09:14:56 [36mINFO: [39m test-node.js test: concurrent
|
||||
2021-06-18 09:14:56 [35mSTATE:[39m test-node.js passed: load image: samples/ai-face.jpg [1,256,256,3]
|
||||
2021-06-18 09:14:56 [35mSTATE:[39m test-node.js passed: load image: samples/ai-face.jpg [1,256,256,3]
|
||||
2021-06-18 09:14:57 [35mSTATE:[39m test-node.js passed: load image: samples/ai-body.jpg [1,1200,1200,3]
|
||||
2021-06-18 09:14:57 [35mSTATE:[39m test-node.js passed: load image: samples/ai-body.jpg [1,1200,1200,3]
|
||||
2021-06-18 09:15:00 [35mSTATE:[39m test-node.js passed: detect: samples/ai-face.jpg default
|
||||
2021-06-18 09:15:00 [32mDATA: [39m 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.73,"keypoints":17}
|
||||
2021-06-18 09:15:00 [32mDATA: [39m test-node.js result: performance: load: 210 total: 2596
|
||||
2021-06-18 09:15:00 [35mSTATE:[39m test-node.js passed: detect: samples/ai-face.jpg default
|
||||
2021-06-18 09:15:00 [32mDATA: [39m 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.73,"keypoints":17}
|
||||
2021-06-18 09:15:00 [32mDATA: [39m test-node.js result: performance: load: 3 total: 2596
|
||||
2021-06-18 09:15:00 [35mSTATE:[39m test-node.js passed: detect: samples/ai-body.jpg default
|
||||
2021-06-18 09:15:00 [32mDATA: [39m 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.93,"keypoints":17}
|
||||
2021-06-18 09:15:00 [32mDATA: [39m test-node.js result: performance: load: 210 total: 2596
|
||||
2021-06-18 09:15:00 [35mSTATE:[39m test-node.js passed: detect: samples/ai-body.jpg default
|
||||
2021-06-18 09:15:00 [32mDATA: [39m 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.93,"keypoints":17}
|
||||
2021-06-18 09:15:00 [32mDATA: [39m test-node.js result: performance: load: 3 total: 2596
|
||||
2021-06-18 09:15:00 [36mINFO: [39m test-node.js test complete: 9310 ms
|
||||
2021-06-18 09:15:00 [36mINFO: [39m test-node-gpu.js start
|
||||
2021-06-18 09:15:00 [33mWARN: [39m test-node-gpu.js stderr: 2021-06-18 09:15:00.635853: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] 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-06-18 09:15:00 [33mWARN: [39m test-node-gpu.js stderr: 2021-06-18 09:15:00.671413: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory
|
||||
2021-06-18 09:15:00 [33mWARN: [39m test-node-gpu.js stderr: 2021-06-18 09:15:00.671481: 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-06-18 09:15:00 [35mSTATE:[39m test-node-gpu.js passed: create human
|
||||
2021-06-18 09:15:00 [36mINFO: [39m test-node-gpu.js human version: 2.0.3
|
||||
2021-06-18 09:15:00 [36mINFO: [39m test-node-gpu.js platform: linux x64 agent: NodeJS v16.0.0
|
||||
2021-06-18 09:15:00 [36mINFO: [39m test-node-gpu.js tfjs version: 3.7.0
|
||||
2021-06-18 09:15:00 [35mSTATE:[39m test-node-gpu.js passed: set backend: tensorflow
|
||||
2021-06-18 09:15:00 [35mSTATE:[39m test-node-gpu.js passed: load models
|
||||
2021-06-18 09:15:00 [35mSTATE:[39m test-node-gpu.js result: defined models: 14 loaded models: 7
|
||||
2021-06-18 09:15:00 [35mSTATE:[39m test-node-gpu.js passed: warmup: none default
|
||||
2021-06-18 09:15:01 [35mSTATE:[39m test-node-gpu.js passed: warmup: face default
|
||||
2021-06-18 09:15:01 [32mDATA: [39m 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.73,"keypoints":5}
|
||||
2021-06-18 09:15:01 [32mDATA: [39m test-node-gpu.js result: performance: load: 210 total: 829
|
||||
2021-06-18 09:15:02 [35mSTATE:[39m test-node-gpu.js passed: warmup: body default
|
||||
2021-06-18 09:15:02 [32mDATA: [39m 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.93,"keypoints":17}
|
||||
2021-06-18 09:15:02 [32mDATA: [39m test-node-gpu.js result: performance: load: 210 total: 737
|
||||
2021-06-18 09:15:02 [36mINFO: [39m test-node-gpu.js test body variants
|
||||
2021-06-18 09:15:03 [35mSTATE:[39m test-node-gpu.js passed: load image: samples/ai-body.jpg [1,1200,1200,3]
|
||||
2021-06-18 09:15:03 [35mSTATE:[39m test-node-gpu.js passed: detect: samples/ai-body.jpg posenet
|
||||
2021-06-18 09:15:03 [32mDATA: [39m 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-06-18 09:15:03 [32mDATA: [39m test-node-gpu.js result: performance: load: 210 total: 552
|
||||
2021-06-18 09:15:04 [35mSTATE:[39m test-node-gpu.js passed: load image: samples/ai-body.jpg [1,1200,1200,3]
|
||||
2021-06-18 09:15:04 [35mSTATE:[39m test-node-gpu.js passed: detect: samples/ai-body.jpg movenet
|
||||
2021-06-18 09:15:04 [32mDATA: [39m 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.93,"keypoints":17}
|
||||
2021-06-18 09:15:04 [32mDATA: [39m test-node-gpu.js result: performance: load: 210 total: 140
|
||||
2021-06-18 09:15:04 [35mSTATE:[39m test-node-gpu.js passed: detect: random default
|
||||
2021-06-18 09:15:04 [32mDATA: [39m 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-06-18 09:15:04 [32mDATA: [39m test-node-gpu.js result: performance: load: 210 total: 118
|
||||
2021-06-18 09:15:04 [36mINFO: [39m test-node-gpu.js test: first instance
|
||||
2021-06-18 09:15:05 [35mSTATE:[39m test-node-gpu.js passed: load image: samples/ai-upper.jpg [1,720,688,3]
|
||||
2021-06-18 09:15:05 [35mSTATE:[39m test-node-gpu.js passed: detect: samples/ai-upper.jpg default
|
||||
2021-06-18 09:15:05 [32mDATA: [39m test-node-gpu.js result: face: 0 body: 1 hand: 0 gesture: 1 object: 1 person: 0 {} {"score":0.72,"class":"person"} {"score":0.78,"keypoints":7}
|
||||
2021-06-18 09:15:05 [32mDATA: [39m test-node-gpu.js result: performance: load: 210 total: 93
|
||||
2021-06-18 09:15:05 [36mINFO: [39m test-node-gpu.js test: second instance
|
||||
2021-06-18 09:15:05 [35mSTATE:[39m test-node-gpu.js passed: load image: samples/ai-upper.jpg [1,720,688,3]
|
||||
2021-06-18 09:15:06 [35mSTATE:[39m test-node-gpu.js passed: detect: samples/ai-upper.jpg default
|
||||
2021-06-18 09:15:06 [32mDATA: [39m 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.78,"keypoints":7}
|
||||
2021-06-18 09:15:06 [32mDATA: [39m test-node-gpu.js result: performance: load: 3 total: 655
|
||||
2021-06-18 09:15:06 [36mINFO: [39m test-node-gpu.js test: concurrent
|
||||
2021-06-18 09:15:06 [35mSTATE:[39m test-node-gpu.js passed: load image: samples/ai-face.jpg [1,256,256,3]
|
||||
2021-06-18 09:15:06 [35mSTATE:[39m test-node-gpu.js passed: load image: samples/ai-face.jpg [1,256,256,3]
|
||||
2021-06-18 09:15:06 [35mSTATE:[39m test-node-gpu.js passed: load image: samples/ai-body.jpg [1,1200,1200,3]
|
||||
2021-06-18 09:15:07 [35mSTATE:[39m test-node-gpu.js passed: load image: samples/ai-body.jpg [1,1200,1200,3]
|
||||
2021-06-18 09:15:10 [35mSTATE:[39m test-node-gpu.js passed: detect: samples/ai-face.jpg default
|
||||
2021-06-18 09:15:10 [32mDATA: [39m 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.73,"keypoints":17}
|
||||
2021-06-18 09:15:10 [32mDATA: [39m test-node-gpu.js result: performance: load: 210 total: 2595
|
||||
2021-06-18 09:15:10 [35mSTATE:[39m test-node-gpu.js passed: detect: samples/ai-face.jpg default
|
||||
2021-06-18 09:15:10 [32mDATA: [39m 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.73,"keypoints":17}
|
||||
2021-06-18 09:15:10 [32mDATA: [39m test-node-gpu.js result: performance: load: 3 total: 2595
|
||||
2021-06-18 09:15:10 [35mSTATE:[39m test-node-gpu.js passed: detect: samples/ai-body.jpg default
|
||||
2021-06-18 09:15:10 [32mDATA: [39m 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.93,"keypoints":17}
|
||||
2021-06-18 09:15:10 [32mDATA: [39m test-node-gpu.js result: performance: load: 210 total: 2595
|
||||
2021-06-18 09:15:10 [35mSTATE:[39m test-node-gpu.js passed: detect: samples/ai-body.jpg default
|
||||
2021-06-18 09:15:10 [32mDATA: [39m 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.93,"keypoints":17}
|
||||
2021-06-18 09:15:10 [32mDATA: [39m test-node-gpu.js result: performance: load: 3 total: 2595
|
||||
2021-06-18 09:15:10 [36mINFO: [39m test-node-gpu.js test complete: 9318 ms
|
||||
2021-06-18 09:15:10 [36mINFO: [39m test-node-wasm.js start
|
||||
2021-06-18 09:15:10 [35mSTATE:[39m test-node-wasm.js passed: model server: http://localhost:10030/models/
|
||||
2021-06-18 09:15:10 [35mSTATE:[39m test-node-wasm.js passed: create human
|
||||
2021-06-18 09:15:10 [36mINFO: [39m test-node-wasm.js human version: 2.0.3
|
||||
2021-06-18 09:15:10 [36mINFO: [39m test-node-wasm.js platform: linux x64 agent: NodeJS v16.0.0
|
||||
2021-06-18 09:15:10 [36mINFO: [39m test-node-wasm.js tfjs version: 3.7.0
|
||||
2021-06-18 09:15:10 [35mSTATE:[39m test-node-wasm.js passed: set backend: wasm
|
||||
2021-06-18 09:15:10 [35mSTATE:[39m test-node-wasm.js passed: load models
|
||||
2021-06-18 09:15:10 [35mSTATE:[39m test-node-wasm.js result: defined models: 14 loaded models: 6
|
||||
2021-06-18 09:15:10 [35mSTATE:[39m test-node-wasm.js passed: warmup: none default
|
||||
2021-06-18 09:15:10 [31mERROR:[39m test-node-wasm.js failed: warmup: face default
|
||||
2021-06-18 09:15:10 [31mERROR:[39m test-node-wasm.js failed: warmup: body default
|
||||
2021-06-18 09:15:10 [36mINFO: [39m test-node-wasm.js test body variants
|
||||
2021-06-18 09:15:11 [35mSTATE:[39m test-node-wasm.js passed: load image: samples/ai-body.jpg [1,1200,1200,3]
|
||||
2021-06-18 09:15:14 [35mSTATE:[39m test-node-wasm.js passed: detect: samples/ai-body.jpg posenet
|
||||
2021-06-18 09:15:14 [32mDATA: [39m 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-06-18 09:15:14 [32mDATA: [39m test-node-wasm.js result: performance: load: 397 total: 2185
|
||||
2021-06-18 09:15:15 [35mSTATE:[39m test-node-wasm.js passed: load image: samples/ai-body.jpg [1,1200,1200,3]
|
||||
2021-06-18 09:15:16 [35mSTATE:[39m test-node-wasm.js passed: detect: samples/ai-body.jpg movenet
|
||||
2021-06-18 09:15:16 [32mDATA: [39m test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 0 person: 1 {"age":28.5,"gender":"female"} {} {"score":0.93,"keypoints":17}
|
||||
2021-06-18 09:15:16 [32mDATA: [39m test-node-wasm.js result: performance: load: 397 total: 1392
|
||||
2021-06-18 09:15:16 [35mSTATE:[39m test-node-wasm.js passed: detect: random default
|
||||
2021-06-18 09:15:16 [32mDATA: [39m test-node-wasm.js result: face: 0 body: 1 hand: 0 gesture: 1 object: 0 person: 0 {} {} {"score":0.93,"keypoints":17}
|
||||
2021-06-18 09:15:16 [32mDATA: [39m test-node-wasm.js result: performance: load: 397 total: 112
|
||||
2021-06-18 09:15:16 [36mINFO: [39m test-node-wasm.js test: first instance
|
||||
2021-06-18 09:15:17 [35mSTATE:[39m test-node-wasm.js passed: load image: samples/ai-upper.jpg [1,720,688,3]
|
||||
2021-06-18 09:15:17 [35mSTATE:[39m test-node-wasm.js passed: detect: samples/ai-upper.jpg default
|
||||
2021-06-18 09:15:17 [32mDATA: [39m test-node-wasm.js result: face: 0 body: 1 hand: 0 gesture: 1 object: 0 person: 0 {} {} {"score":0.78,"keypoints":7}
|
||||
2021-06-18 09:15:17 [32mDATA: [39m test-node-wasm.js result: performance: load: 397 total: 211
|
||||
2021-06-18 09:15:17 [36mINFO: [39m test-node-wasm.js test: second instance
|
||||
2021-06-18 09:15:17 [35mSTATE:[39m test-node-wasm.js passed: load image: samples/ai-upper.jpg [1,720,688,3]
|
||||
2021-06-18 09:15:19 [35mSTATE:[39m test-node-wasm.js passed: detect: samples/ai-upper.jpg default
|
||||
2021-06-18 09:15:19 [32mDATA: [39m test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 0 person: 1 {"age":29.5,"gender":"female"} {} {"score":0.78,"keypoints":7}
|
||||
2021-06-18 09:15:19 [32mDATA: [39m test-node-wasm.js result: performance: load: 3 total: 1587
|
||||
2021-06-18 09:15:19 [36mINFO: [39m test-node-wasm.js test: concurrent
|
||||
2021-06-18 09:15:19 [35mSTATE:[39m test-node-wasm.js passed: load image: samples/ai-face.jpg [1,256,256,3]
|
||||
2021-06-18 09:15:19 [35mSTATE:[39m test-node-wasm.js passed: load image: samples/ai-face.jpg [1,256,256,3]
|
||||
2021-06-18 09:15:20 [35mSTATE:[39m test-node-wasm.js passed: load image: samples/ai-body.jpg [1,1200,1200,3]
|
||||
2021-06-18 09:15:21 [35mSTATE:[39m test-node-wasm.js passed: load image: samples/ai-body.jpg [1,1200,1200,3]
|
||||
2021-06-18 09:15:28 [35mSTATE:[39m test-node-wasm.js passed: detect: samples/ai-face.jpg default
|
||||
2021-06-18 09:15:28 [32mDATA: [39m test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 0 person: 1 {"age":23.6,"gender":"female"} {} {"score":0.73,"keypoints":17}
|
||||
2021-06-18 09:15:28 [32mDATA: [39m test-node-wasm.js result: performance: load: 397 total: 6209
|
||||
2021-06-18 09:15:28 [35mSTATE:[39m test-node-wasm.js passed: detect: samples/ai-face.jpg default
|
||||
2021-06-18 09:15:28 [32mDATA: [39m test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 0 person: 1 {"age":23.6,"gender":"female"} {} {"score":0.73,"keypoints":17}
|
||||
2021-06-18 09:15:28 [32mDATA: [39m test-node-wasm.js result: performance: load: 3 total: 6209
|
||||
2021-06-18 09:15:28 [35mSTATE:[39m test-node-wasm.js passed: detect: samples/ai-body.jpg default
|
||||
2021-06-18 09:15:28 [32mDATA: [39m test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 0 person: 1 {"age":28.5,"gender":"female"} {} {"score":0.93,"keypoints":17}
|
||||
2021-06-18 09:15:28 [32mDATA: [39m test-node-wasm.js result: performance: load: 397 total: 6209
|
||||
2021-06-18 09:15:28 [35mSTATE:[39m test-node-wasm.js passed: detect: samples/ai-body.jpg default
|
||||
2021-06-18 09:15:28 [32mDATA: [39m test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 0 person: 1 {"age":28.5,"gender":"female"} {} {"score":0.93,"keypoints":17}
|
||||
2021-06-18 09:15:28 [32mDATA: [39m test-node-wasm.js result: performance: load: 3 total: 6209
|
||||
2021-06-18 09:15:28 [36mINFO: [39m test-node-wasm.js test complete: 17910 ms
|
||||
2021-06-18 09:15:28 [36mINFO: [39m status: {"passed":68,"failed":2}
|
||||
|
|
|
@ -185,9 +185,9 @@
|
|||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>Draw helper classes that can draw detected objects on canvas using specified draw styles</p>
|
||||
<p>Draw helper classes that can draw detected objects on canvas using specified draw</p>
|
||||
<ul>
|
||||
<li>options: global settings for all draw operations, can be overriden for each draw method, for details see <a href="../interfaces/drawoptions.html">DrawOptions</a></li>
|
||||
<li>options: <a href="../interfaces/drawoptions.html">DrawOptions</a> global settings for all draw operations, can be overriden for each draw method</li>
|
||||
<li>face: draw detected faces</li>
|
||||
<li>body: draw detected people and body parts</li>
|
||||
<li>hand: draw detected hands and hand parts</li>
|
||||
|
@ -416,7 +416,7 @@
|
|||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
|
||||
<a name="models" class="tsd-anchor"></a>
|
||||
<h3>models</h3>
|
||||
<div class="tsd-signature tsd-kind-icon">models<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span>age<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">; </span>blazepose<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">; </span>centernet<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">; </span>efficientpose<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">; </span>embedding<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">; </span>emotion<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">; </span>face<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">; </span>faceres<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">; </span>gender<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">; </span>handpose<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">; </span>movenet<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">; </span>nanodet<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">; </span>posenet<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">; </span>segmentation<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol"> }</span></div>
|
||||
<div class="tsd-signature tsd-kind-icon">models<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span>age<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">GraphModel</span><span class="tsd-signature-symbol">; </span>blazepose<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">GraphModel</span><span class="tsd-signature-symbol">; </span>centernet<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">GraphModel</span><span class="tsd-signature-symbol">; </span>efficientpose<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">GraphModel</span><span class="tsd-signature-symbol">; </span>embedding<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">GraphModel</span><span class="tsd-signature-symbol">; </span>emotion<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">GraphModel</span><span class="tsd-signature-symbol">; </span>face<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">GraphModel</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">GraphModel</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">; </span>faceres<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">GraphModel</span><span class="tsd-signature-symbol">; </span>gender<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">GraphModel</span><span class="tsd-signature-symbol">; </span>handpose<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">GraphModel</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">GraphModel</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">; </span>movenet<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">GraphModel</span><span class="tsd-signature-symbol">; </span>nanodet<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">GraphModel</span><span class="tsd-signature-symbol">; </span>posenet<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">GraphModel</span><span class="tsd-signature-symbol">; </span>segmentation<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">GraphModel</span><span class="tsd-signature-symbol"> }</span></div>
|
||||
<aside class="tsd-sources">
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
|
@ -430,46 +430,46 @@
|
|||
<h4>Type declaration</h4>
|
||||
<ul class="tsd-parameters">
|
||||
<li class="tsd-parameter">
|
||||
<h5>age<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">unknown</span></h5>
|
||||
<h5>age<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">GraphModel</span></h5>
|
||||
</li>
|
||||
<li class="tsd-parameter">
|
||||
<h5>blazepose<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">unknown</span></h5>
|
||||
<h5>blazepose<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">GraphModel</span></h5>
|
||||
</li>
|
||||
<li class="tsd-parameter">
|
||||
<h5>centernet<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">unknown</span></h5>
|
||||
<h5>centernet<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">GraphModel</span></h5>
|
||||
</li>
|
||||
<li class="tsd-parameter">
|
||||
<h5>efficientpose<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">unknown</span></h5>
|
||||
<h5>efficientpose<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">GraphModel</span></h5>
|
||||
</li>
|
||||
<li class="tsd-parameter">
|
||||
<h5>embedding<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">unknown</span></h5>
|
||||
<h5>embedding<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">GraphModel</span></h5>
|
||||
</li>
|
||||
<li class="tsd-parameter">
|
||||
<h5>emotion<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">unknown</span></h5>
|
||||
<h5>emotion<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">GraphModel</span></h5>
|
||||
</li>
|
||||
<li class="tsd-parameter">
|
||||
<h5>face<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">]</span></h5>
|
||||
<h5>face<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">GraphModel</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">GraphModel</span><span class="tsd-signature-symbol">]</span></h5>
|
||||
</li>
|
||||
<li class="tsd-parameter">
|
||||
<h5>faceres<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">unknown</span></h5>
|
||||
<h5>faceres<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">GraphModel</span></h5>
|
||||
</li>
|
||||
<li class="tsd-parameter">
|
||||
<h5>gender<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">unknown</span></h5>
|
||||
<h5>gender<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">GraphModel</span></h5>
|
||||
</li>
|
||||
<li class="tsd-parameter">
|
||||
<h5>handpose<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">]</span></h5>
|
||||
<h5>handpose<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">GraphModel</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">GraphModel</span><span class="tsd-signature-symbol">]</span></h5>
|
||||
</li>
|
||||
<li class="tsd-parameter">
|
||||
<h5>movenet<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">unknown</span></h5>
|
||||
<h5>movenet<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">GraphModel</span></h5>
|
||||
</li>
|
||||
<li class="tsd-parameter">
|
||||
<h5>nanodet<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">unknown</span></h5>
|
||||
<h5>nanodet<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">GraphModel</span></h5>
|
||||
</li>
|
||||
<li class="tsd-parameter">
|
||||
<h5>posenet<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">unknown</span></h5>
|
||||
<h5>posenet<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">GraphModel</span></h5>
|
||||
</li>
|
||||
<li class="tsd-parameter">
|
||||
<h5>segmentation<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">unknown</span></h5>
|
||||
<h5>segmentation<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">GraphModel</span></h5>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -809,7 +809,7 @@
|
|||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>Warmup metho pre-initializes all models for faster inference</p>
|
||||
<p>Warmup method pre-initializes all configured models for faster inference</p>
|
||||
<ul>
|
||||
<li>can take significant time on startup</li>
|
||||
<li>only used for <code>webgl</code> and <code>humangl</code> backends</li>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
/**
|
||||
* FaceMesh & BlazeFace Module entry point
|
||||
*/
|
||||
import { Tensor } from '../tfjs/types';
|
||||
import { GraphModel, Tensor } from '../tfjs/types';
|
||||
import { Face } from '../result';
|
||||
import { Config } from '../config';
|
||||
export declare function predict(input: Tensor, config: Config): Promise<Face[]>;
|
||||
export declare function load(config: any): Promise<[unknown, unknown, unknown]>;
|
||||
export declare function load(config: any): Promise<[unknown, GraphModel | null, GraphModel | null]>;
|
||||
export declare const triangulation: number[];
|
||||
export declare const uvmap: number[][];
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* HandPose module entry point
|
||||
*/
|
||||
import { Hand } from '../result';
|
||||
import { Tensor } from '../tfjs/types';
|
||||
import { Tensor, GraphModel } from '../tfjs/types';
|
||||
import { Config } from '../config';
|
||||
export declare function predict(input: Tensor, config: Config): Promise<Hand[]>;
|
||||
export declare function load(config: Config): Promise<[unknown, unknown]>;
|
||||
export declare function load(config: Config): Promise<[GraphModel | null, GraphModel | null]>;
|
||||
|
|
|
@ -6,7 +6,7 @@ import { Result } from './result';
|
|||
import * as tf from '../dist/tfjs.esm.js';
|
||||
import * as facemesh from './blazeface/facemesh';
|
||||
import * as draw from './draw/draw';
|
||||
import { Tensor } from './tfjs/types';
|
||||
import { Tensor, GraphModel } from './tfjs/types';
|
||||
export type { Config } from './config';
|
||||
export type { Result, Face, Hand, Body, Item, Gesture, Person } from './result';
|
||||
export type { DrawOptions } from './draw/draw';
|
||||
|
@ -24,10 +24,6 @@ export declare type Error = {
|
|||
* @external
|
||||
*/
|
||||
export declare type TensorFlow = typeof tf;
|
||||
/** Generic Model object type
|
||||
* holds instance of individual models
|
||||
*/
|
||||
declare type Model = unknown;
|
||||
/**
|
||||
* **Human** library main class
|
||||
*
|
||||
|
@ -65,8 +61,8 @@ export declare class Human {
|
|||
* - Can be embedded or externally provided
|
||||
*/
|
||||
tf: TensorFlow;
|
||||
/** Draw helper classes that can draw detected objects on canvas using specified draw styles
|
||||
* - options: global settings for all draw operations, can be overriden for each draw method, for details see {@link DrawOptions}
|
||||
/** Draw helper classes that can draw detected objects on canvas using specified draw
|
||||
* - options: {@link DrawOptions} global settings for all draw operations, can be overriden for each draw method
|
||||
* - face: draw detected faces
|
||||
* - body: draw detected people and body parts
|
||||
* - hand: draw detected hands and hand parts
|
||||
|
@ -84,20 +80,20 @@ export declare class Human {
|
|||
};
|
||||
/** @internal: Currently loaded models */
|
||||
models: {
|
||||
face: [Model, Model, Model] | null;
|
||||
posenet: Model | null;
|
||||
blazepose: Model | null;
|
||||
efficientpose: Model | null;
|
||||
movenet: Model | null;
|
||||
handpose: [Model, Model] | null;
|
||||
age: Model | null;
|
||||
gender: Model | null;
|
||||
emotion: Model | null;
|
||||
embedding: Model | null;
|
||||
nanodet: Model | null;
|
||||
centernet: Model | null;
|
||||
faceres: Model | null;
|
||||
segmentation: Model | null;
|
||||
face: [unknown, GraphModel | null, GraphModel | null] | null;
|
||||
posenet: GraphModel | null;
|
||||
blazepose: GraphModel | null;
|
||||
efficientpose: GraphModel | null;
|
||||
movenet: GraphModel | null;
|
||||
handpose: [GraphModel | null, GraphModel | null] | null;
|
||||
age: GraphModel | null;
|
||||
gender: GraphModel | null;
|
||||
emotion: GraphModel | null;
|
||||
embedding: GraphModel | null;
|
||||
nanodet: GraphModel | null;
|
||||
centernet: GraphModel | null;
|
||||
faceres: GraphModel | null;
|
||||
segmentation: GraphModel | null;
|
||||
};
|
||||
/** Reference face triangualtion array of 468 points, used for triangle references between points */
|
||||
faceTriangulation: typeof facemesh.triangulation;
|
||||
|
@ -180,7 +176,7 @@ export declare class Human {
|
|||
* @returns result: {@link Result}
|
||||
*/
|
||||
detect(input: Input, userConfig?: Config | Record<string, unknown>): Promise<Result | Error>;
|
||||
/** Warmup metho pre-initializes all models for faster inference
|
||||
/** Warmup method pre-initializes all configured models for faster inference
|
||||
* - can take significant time on startup
|
||||
* - only used for `webgl` and `humangl` backends
|
||||
* @param userConfig?: Config
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
/** Load method preloads all instance.configured models on-demand
|
||||
* - Not explicitly required as any required model is load implicitly on it's first run
|
||||
* @param userinstance.config?: {@link instance.config}
|
||||
*/
|
||||
export declare function load(instance: any): Promise<void>;
|
Loading…
Reference in New Issue