mirror of https://github.com/vladmandic/human
update typedoc definitions
parent
b580ac2c3b
commit
c76d5ee5a2
|
@ -11,6 +11,7 @@ Repository: **<git+https://github.com/vladmandic/human.git>**
|
|||
|
||||
### **HEAD -> main** 2021/05/30 mandic00@live.com
|
||||
|
||||
- implemented service worker
|
||||
- quantized centernet
|
||||
- release candidate
|
||||
- added usage restrictions
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
<meta name="application-name" content="Human">
|
||||
<meta name="description" content="Human: 3D Face Detection, Body Pose, Hand & Finger Tracking, Iris Tracking, Age & Gender Prediction, Emotion Prediction & Gesture Recognition; Author: Vladimir Mandic <https://github.com/vladmandic>">
|
||||
<meta name="msapplication-tooltip" content="Human: 3D Face Detection, Body Pose, Hand & Finger Tracking, Iris Tracking, Age & Gender Prediction, Emotion Prediction & Gesture Recognition; Author: Vladimir Mandic <https://github.com/vladmandic>">
|
||||
<meta name="theme-color" content="#000000">
|
||||
<link rel="manifest" href="./manifest.webmanifest">
|
||||
<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon">
|
||||
<link rel="apple-touch-icon" href="../assets/icon.png">
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
<meta name="application-name" content="Human">
|
||||
<meta name="description" content="Human: 3D Face Detection, Body Pose, Hand & Finger Tracking, Iris Tracking, Age & Gender Prediction, Emotion Prediction & Gesture Recognition; Author: Vladimir Mandic <https://github.com/vladmandic>">
|
||||
<meta name="msapplication-tooltip" content="Human: 3D Face Detection, Body Pose, Hand & Finger Tracking, Iris Tracking, Age & Gender Prediction, Emotion Prediction & Gesture Recognition; Author: Vladimir Mandic <https://github.com/vladmandic>">
|
||||
<meta name="theme-color" content="#000000">
|
||||
<link rel="manifest" href="./manifest.webmanifest">
|
||||
<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon">
|
||||
<link rel="apple-touch-icon" href="../assets/icon.png">
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/* eslint-disable max-len */
|
||||
|
||||
// @ts-nocheck
|
||||
// based on: https://github.com/munrocket/gl-bench
|
||||
|
||||
const UICSS = `
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
<meta name="application-name" content="Human">
|
||||
<meta name="description" content="Human: 3D Face Detection, Body Pose, Hand & Finger Tracking, Iris Tracking, Age & Gender Prediction, Emotion Prediction & Gesture Recognition; Author: Vladimir Mandic <https://github.com/vladmandic>">
|
||||
<meta name="msapplication-tooltip" content="Human: 3D Face Detection, Body Pose, Hand & Finger Tracking, Iris Tracking, Age & Gender Prediction, Emotion Prediction & Gesture Recognition; Author: Vladimir Mandic <https://github.com/vladmandic>">
|
||||
<meta name="theme-color" content="#000000">
|
||||
<link rel="manifest" href="./manifest.webmanifest">
|
||||
<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon">
|
||||
<link rel="apple-touch-icon" href="../assets/icon.png">
|
||||
|
|
|
@ -30,6 +30,8 @@ let human;
|
|||
const userConfig = {
|
||||
warmup: 'none',
|
||||
backend: 'webgl',
|
||||
wasmPath: 'https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm@3.6.0/dist/',
|
||||
/*
|
||||
async: false,
|
||||
cacheSensitivity: 0,
|
||||
filter: {
|
||||
|
@ -49,6 +51,7 @@ const userConfig = {
|
|||
body: { enabled: false, modelPath: 'movenet-lightning.json' },
|
||||
object: { enabled: false },
|
||||
gesture: { enabled: true },
|
||||
*/
|
||||
};
|
||||
|
||||
const drawOptions = {
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
<meta name="keywords" content="Human">
|
||||
<meta name="description" content="Human; Author: Vladimir Mandic <mandic00@live.com>">
|
||||
<meta name="msapplication-tooltip" content="Human; Author: Vladimir Mandic <mandic00@live.com>">
|
||||
<meta name="theme-color" content="#000000">
|
||||
<link rel="manifest" href="manifest.webmanifest">
|
||||
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
|
||||
<link rel="icon" sizes="256x256" href="../assets/icon.png">
|
||||
|
|
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
|
@ -123,7 +123,7 @@ function mergeDeep(...objects) {
|
|||
var config = {
|
||||
backend: "webgl",
|
||||
modelBasePath: "../models/",
|
||||
wasmPath: "../node_modules/@tensorflow/tfjs-backend-wasm/dist//",
|
||||
wasmPath: "../node_modules/@tensorflow/tfjs-backend-wasm/dist/",
|
||||
debug: true,
|
||||
async: true,
|
||||
warmup: "full",
|
||||
|
|
|
@ -124,7 +124,7 @@ function mergeDeep(...objects) {
|
|||
var config = {
|
||||
backend: "webgl",
|
||||
modelBasePath: "../models/",
|
||||
wasmPath: "../node_modules/@tensorflow/tfjs-backend-wasm/dist//",
|
||||
wasmPath: "../node_modules/@tensorflow/tfjs-backend-wasm/dist/",
|
||||
debug: true,
|
||||
async: true,
|
||||
warmup: "full",
|
||||
|
|
|
@ -123,7 +123,7 @@ function mergeDeep(...objects) {
|
|||
var config = {
|
||||
backend: "webgl",
|
||||
modelBasePath: "../models/",
|
||||
wasmPath: "../node_modules/@tensorflow/tfjs-backend-wasm/dist//",
|
||||
wasmPath: "../node_modules/@tensorflow/tfjs-backend-wasm/dist/",
|
||||
debug: true,
|
||||
async: true,
|
||||
warmup: "full",
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
2021-05-30 17:55:58 [36mINFO: [39m @vladmandic/human version 2.0.0
|
||||
2021-05-30 17:55:58 [36mINFO: [39m User: vlado Platform: linux Arch: x64 Node: v16.0.0
|
||||
2021-05-30 17:55:58 [36mINFO: [39m Build: file startup all type: production config: {"minifyWhitespace":true,"minifyIdentifiers":true,"minifySyntax":true}
|
||||
2021-05-30 17:55:58 [35mSTATE:[39m Build for: node type: tfjs: {"imports":1,"importBytes":102,"outputBytes":1292,"outputFiles":"dist/tfjs.esm.js"}
|
||||
2021-05-30 17:55:58 [35mSTATE:[39m Build for: node type: node: {"imports":39,"importBytes":446068,"outputBytes":398047,"outputFiles":"dist/human.node.js"}
|
||||
2021-05-30 17:55:58 [35mSTATE:[39m Build for: nodeGPU type: tfjs: {"imports":1,"importBytes":110,"outputBytes":1300,"outputFiles":"dist/tfjs.esm.js"}
|
||||
2021-05-30 17:55:58 [35mSTATE:[39m Build for: nodeGPU type: node: {"imports":39,"importBytes":446076,"outputBytes":398051,"outputFiles":"dist/human.node-gpu.js"}
|
||||
2021-05-30 17:55:58 [35mSTATE:[39m Build for: nodeWASM type: tfjs: {"imports":1,"importBytes":149,"outputBytes":1367,"outputFiles":"dist/tfjs.esm.js"}
|
||||
2021-05-30 17:55:58 [35mSTATE:[39m Build for: nodeWASM type: node: {"imports":39,"importBytes":446143,"outputBytes":398123,"outputFiles":"dist/human.node-wasm.js"}
|
||||
2021-05-30 17:55:58 [35mSTATE:[39m Build for: browserNoBundle type: tfjs: {"imports":1,"importBytes":2478,"outputBytes":1394,"outputFiles":"dist/tfjs.esm.js"}
|
||||
2021-05-30 17:55:58 [35mSTATE:[39m Build for: browserNoBundle type: esm: {"imports":39,"importBytes":446170,"outputBytes":243299,"outputFiles":"dist/human.esm-nobundle.js"}
|
||||
2021-05-30 17:55:59 [35mSTATE:[39m Build for: browserBundle type: tfjs: {"modules":1274,"moduleBytes":4114813,"imports":7,"importBytes":2478,"outputBytes":1111418,"outputFiles":"dist/tfjs.esm.js"}
|
||||
2021-05-30 17:55:59 [35mSTATE:[39m Build for: browserBundle type: iife: {"imports":39,"importBytes":1556194,"outputBytes":1351116,"outputFiles":"dist/human.js"}
|
||||
2021-05-30 17:56:00 [35mSTATE:[39m Build for: browserBundle type: esm: {"imports":39,"importBytes":1556194,"outputBytes":1351108,"outputFiles":"dist/human.esm.js"}
|
||||
2021-05-30 17:56:00 [36mINFO: [39m Generate types: ["src/human.ts"]
|
||||
2021-05-30 17:56:05 [36mINFO: [39m Update Change log: ["/home/vlado/dev/human/CHANGELOG.md"]
|
||||
2021-05-30 17:56:05 [36mINFO: [39m Generate TypeDocs: ["src/human.ts"]
|
||||
2021-05-30 18:44:01 [36mINFO: [39m @vladmandic/human version 2.0.0
|
||||
2021-05-30 18:44:01 [36mINFO: [39m User: vlado Platform: linux Arch: x64 Node: v16.0.0
|
||||
2021-05-30 18:44:01 [36mINFO: [39m Build: file startup all type: production config: {"minifyWhitespace":true,"minifyIdentifiers":true,"minifySyntax":true}
|
||||
2021-05-30 18:44:01 [35mSTATE:[39m Build for: node type: tfjs: {"imports":1,"importBytes":102,"outputBytes":1292,"outputFiles":"dist/tfjs.esm.js"}
|
||||
2021-05-30 18:44:01 [35mSTATE:[39m Build for: node type: node: {"imports":39,"importBytes":446470,"outputBytes":398046,"outputFiles":"dist/human.node.js"}
|
||||
2021-05-30 18:44:01 [35mSTATE:[39m Build for: nodeGPU type: tfjs: {"imports":1,"importBytes":110,"outputBytes":1300,"outputFiles":"dist/tfjs.esm.js"}
|
||||
2021-05-30 18:44:01 [35mSTATE:[39m Build for: nodeGPU type: node: {"imports":39,"importBytes":446478,"outputBytes":398050,"outputFiles":"dist/human.node-gpu.js"}
|
||||
2021-05-30 18:44:01 [35mSTATE:[39m Build for: nodeWASM type: tfjs: {"imports":1,"importBytes":149,"outputBytes":1367,"outputFiles":"dist/tfjs.esm.js"}
|
||||
2021-05-30 18:44:01 [35mSTATE:[39m Build for: nodeWASM type: node: {"imports":39,"importBytes":446545,"outputBytes":398122,"outputFiles":"dist/human.node-wasm.js"}
|
||||
2021-05-30 18:44:01 [35mSTATE:[39m Build for: browserNoBundle type: tfjs: {"imports":1,"importBytes":2478,"outputBytes":1394,"outputFiles":"dist/tfjs.esm.js"}
|
||||
2021-05-30 18:44:02 [35mSTATE:[39m Build for: browserNoBundle type: esm: {"imports":39,"importBytes":446572,"outputBytes":243298,"outputFiles":"dist/human.esm-nobundle.js"}
|
||||
2021-05-30 18:44:02 [35mSTATE:[39m Build for: browserBundle type: tfjs: {"modules":1274,"moduleBytes":4114813,"imports":7,"importBytes":2478,"outputBytes":1111418,"outputFiles":"dist/tfjs.esm.js"}
|
||||
2021-05-30 18:44:02 [35mSTATE:[39m Build for: browserBundle type: iife: {"imports":39,"importBytes":1556596,"outputBytes":1351115,"outputFiles":"dist/human.js"}
|
||||
2021-05-30 18:44:03 [35mSTATE:[39m Build for: browserBundle type: esm: {"imports":39,"importBytes":1556596,"outputBytes":1351107,"outputFiles":"dist/human.esm.js"}
|
||||
2021-05-30 18:44:03 [36mINFO: [39m Generate types: ["src/human.ts"]
|
||||
2021-05-30 18:44:07 [36mINFO: [39m Update Change log: ["/home/vlado/dev/human/CHANGELOG.md"]
|
||||
2021-05-30 18:44:07 [36mINFO: [39m Generate TypeDocs: ["src/human.ts"]
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
* Configuration interface definition for **Human** library
|
||||
*
|
||||
* Contains all configurable parameters
|
||||
* @typedef Config
|
||||
*/
|
||||
export interface Config {
|
||||
/** Backend used for TFJS operations */
|
||||
|
@ -194,7 +195,7 @@ const config: Config = {
|
|||
backend: 'webgl', // select tfjs backend to use, leave empty to use default backend
|
||||
// can be 'webgl', 'wasm', 'cpu', or 'humangl' which is a custom version of webgl
|
||||
modelBasePath: '../models/', // base path for all models
|
||||
wasmPath: '../node_modules/@tensorflow/tfjs-backend-wasm/dist//', // path for wasm binaries, only used for backend: wasm
|
||||
wasmPath: '../node_modules/@tensorflow/tfjs-backend-wasm/dist/', // path for wasm binaries, only used for backend: wasm
|
||||
debug: true, // print additional status messages to console
|
||||
async: true, // execute enabled models in parallel
|
||||
warmup: 'full', // what to use for human.warmup(), can be 'none', 'face', 'full'
|
||||
|
|
33
src/human.ts
33
src/human.ts
|
@ -32,10 +32,14 @@ export type { Config } from './config';
|
|||
export type { Result, Face, Hand, Body, Item, Gesture } from './result';
|
||||
export type { DrawOptions } from './draw/draw';
|
||||
|
||||
/** Defines all possible input types for **Human** detection */
|
||||
/** Defines all possible input types for **Human** detection
|
||||
* @typedef Input
|
||||
*/
|
||||
export type Input = Tensor | typeof Image | ImageData | ImageBitmap | HTMLImageElement | HTMLMediaElement | HTMLVideoElement | HTMLCanvasElement | OffscreenCanvas;
|
||||
|
||||
/** Error message */
|
||||
/** Error message
|
||||
* @typedef Error
|
||||
*/
|
||||
export type Error = { error: string };
|
||||
|
||||
/** Instance of TensorFlow/JS */
|
||||
|
@ -52,6 +56,8 @@ type Model = unknown;
|
|||
* - Configuration object definition: {@link Config}
|
||||
* - Results object definition: {@link Result}
|
||||
* - Possible inputs: {@link Input}
|
||||
*
|
||||
* @param userConfig: {@link Config}
|
||||
*/
|
||||
export class Human {
|
||||
/** Current version of Human library in semver format */
|
||||
|
@ -68,9 +74,9 @@ export class Human {
|
|||
* - Can be polled to determine operations that are currently executed
|
||||
*/
|
||||
state: string;
|
||||
/** Internal: Instance of current image being processed */
|
||||
/** @internal: Instance of current image being processed */
|
||||
image: { tensor: Tensor | null, canvas: OffscreenCanvas | HTMLCanvasElement | null };
|
||||
/** Internal: Instance of TensorFlow/JS used by Human
|
||||
/** @internal: Instance of TensorFlow/JS used by Human
|
||||
* - Can be embedded or externally provided
|
||||
*/
|
||||
tf: TensorFlow;
|
||||
|
@ -91,7 +97,7 @@ export class Human {
|
|||
canvas: typeof draw.canvas,
|
||||
all: typeof draw.all,
|
||||
};
|
||||
/** Internal: Currently loaded models */
|
||||
/** @internal: Currently loaded models */
|
||||
models: {
|
||||
face: [Model, Model, Model] | null,
|
||||
posenet: Model | null,
|
||||
|
@ -108,7 +114,7 @@ export class Human {
|
|||
centernet: Model | null,
|
||||
faceres: Model | null,
|
||||
};
|
||||
/** Internal: Currently loaded classes */
|
||||
/** @internal: Currently loaded classes */
|
||||
classes: {
|
||||
facemesh: typeof facemesh;
|
||||
emotion: typeof emotion;
|
||||
|
@ -137,7 +143,7 @@ export class Human {
|
|||
|
||||
/**
|
||||
* Creates instance of Human library that is futher used for all operations
|
||||
* - @param userConfig: {@link Config}
|
||||
* @param userConfig: {@link Config}
|
||||
*/
|
||||
constructor(userConfig: Config | Record<string, unknown> = {}) {
|
||||
this.tf = tf;
|
||||
|
@ -215,6 +221,9 @@ export class Human {
|
|||
|
||||
/** Simmilarity method calculates simmilarity between two provided face descriptors (face embeddings)
|
||||
* - Calculation is based on normalized Minkowski distance between
|
||||
* @param embedding1: face descriptor as array of numbers
|
||||
* @param embedding2: face descriptor as array of numbers
|
||||
* @returns similarity: number
|
||||
*/
|
||||
// eslint-disable-next-line class-methods-use-this
|
||||
similarity(embedding1: Array<number>, embedding2: Array<number>): number {
|
||||
|
@ -222,7 +231,7 @@ export class Human {
|
|||
}
|
||||
|
||||
/** Enhance method performs additional enhacements to face image previously detected for futher processing
|
||||
* @param input Tensor as provided in human.result.face[n].tensor
|
||||
* @param input: Tensor as provided in human.result.face[n].tensor
|
||||
* @returns Tensor
|
||||
*/
|
||||
// eslint-disable-next-line class-methods-use-this
|
||||
|
@ -231,8 +240,7 @@ export class Human {
|
|||
return faceres.enhance(input);
|
||||
}
|
||||
|
||||
/**
|
||||
* Math method find best match between provided face descriptor and predefined database of known descriptors
|
||||
/** Math method find best match between provided face descriptor and predefined database of known descriptors
|
||||
* @param faceEmbedding: face descriptor previsouly calculated on any face
|
||||
* @param db: array of mapping of face descriptors to known values
|
||||
* @param threshold: minimum score for matching to be considered in the result
|
||||
|
@ -245,6 +253,7 @@ export class Human {
|
|||
|
||||
/** Load method preloads all configured models on-demand
|
||||
* - Not explicitly required as any required model is load implicitly on it's first run
|
||||
* @param userConfig: {@link Config}
|
||||
*/
|
||||
async load(userConfig: Config | Record<string, unknown> = {}) {
|
||||
this.state = 'load';
|
||||
|
@ -404,6 +413,9 @@ export class Human {
|
|||
* - Pre-process input: {@link Input}
|
||||
* - Run inference for all configured models
|
||||
* - Process and return result: {@link Result}
|
||||
* @param input: Input
|
||||
* @param userConfig: Config
|
||||
* @returns result: Result
|
||||
*/
|
||||
async detect(input: Input, userConfig: Config | Record<string, unknown> = {}): Promise<Result | Error> {
|
||||
// detection happens inside a promise
|
||||
|
@ -654,6 +666,7 @@ export class Human {
|
|||
/** Warmup metho pre-initializes all models for faster inference
|
||||
* - can take significant time on startup
|
||||
* - only used for `webgl` and `humangl` backends
|
||||
* @param userConfig: Config
|
||||
*/
|
||||
async warmup(userConfig: Config | Record<string, unknown> = {}): Promise<Result | { error }> {
|
||||
const t0 = now();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Type definitions for Human results
|
||||
* Type definitions for Human result object
|
||||
*/
|
||||
|
||||
import { Tensor } from '../dist/tfjs.esm.js';
|
||||
|
|
|
@ -5,6 +5,7 @@ const config = {
|
|||
modelBasePath: 'http://localhost:10030/models/',
|
||||
backend: 'wasm',
|
||||
wasmPath: 'node_modules/@tensorflow/tfjs-backend-wasm/dist/',
|
||||
// wasmPath: 'https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm@3.6.0/dist/',
|
||||
debug: false,
|
||||
async: false,
|
||||
filter: {
|
||||
|
|
240
test/test.log
240
test/test.log
|
@ -1,120 +1,120 @@
|
|||
2021-05-29 18:30:17 [36mINFO: [39m @vladmandic/human version 1.9.4
|
||||
2021-05-29 18:30:17 [36mINFO: [39m User: vlado Platform: linux Arch: x64 Node: v16.0.0
|
||||
2021-05-29 18:30:17 [36mINFO: [39m tests: ["test-node.js","test-node-gpu.js","test-node-wasm.js"]
|
||||
2021-05-29 18:30:17 [36mINFO: [39m test-node.js start
|
||||
2021-05-29 18:30:19 [35mSTATE:[39m test-node.js passed: create human
|
||||
2021-05-29 18:30:19 [36mINFO: [39m test-node.js human version: 1.9.4
|
||||
2021-05-29 18:30:19 [36mINFO: [39m test-node.js platform: linux x64 agent: NodeJS v16.0.0
|
||||
2021-05-29 18:30:19 [36mINFO: [39m test-node.js tfjs version: 3.6.0
|
||||
2021-05-29 18:30:19 [35mSTATE:[39m test-node.js passed: set backend: tensorflow
|
||||
2021-05-29 18:30:19 [35mSTATE:[39m test-node.js passed: load models
|
||||
2021-05-29 18:30:19 [35mSTATE:[39m test-node.js result: defined models: 14 loaded models: 6
|
||||
2021-05-29 18:30:19 [35mSTATE:[39m test-node.js passed: warmup: none default
|
||||
2021-05-29 18:30:21 [35mSTATE:[39m test-node.js passed: warmup: face default
|
||||
2021-05-29 18:30:21 [32mDATA: [39m test-node.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"confidence":1,"age":23.6,"gender":"female"} {"score":0.8246909379959106,"class":"person"} {"score":0.73,"keypoints":5}
|
||||
2021-05-29 18:30:21 [32mDATA: [39m test-node.js result: performance: load: 345 total: 1666
|
||||
2021-05-29 18:30:22 [35mSTATE:[39m test-node.js passed: warmup: body default
|
||||
2021-05-29 18:30:22 [32mDATA: [39m test-node.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"confidence":1,"age":29.5,"gender":"female"} {"score":0.7261000871658325,"class":"person"} {"score":0.93,"keypoints":17}
|
||||
2021-05-29 18:30:22 [32mDATA: [39m test-node.js result: performance: load: 345 total: 1523
|
||||
2021-05-29 18:30:22 [36mINFO: [39m test-node.js test body variants
|
||||
2021-05-29 18:30:23 [35mSTATE:[39m test-node.js passed: load image: assets/human-sample-body.jpg [1,1200,1200,3]
|
||||
2021-05-29 18:30:24 [35mSTATE:[39m test-node.js passed: detect: assets/human-sample-body.jpg posenet
|
||||
2021-05-29 18:30:24 [32mDATA: [39m test-node.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"confidence":1} {"score":0.7261000871658325,"class":"person"} {"score":0.96,"keypoints":16}
|
||||
2021-05-29 18:30:24 [32mDATA: [39m test-node.js result: performance: load: 345 total: 987
|
||||
2021-05-29 18:30:25 [35mSTATE:[39m test-node.js passed: load image: assets/human-sample-body.jpg [1,1200,1200,3]
|
||||
2021-05-29 18:30:26 [35mSTATE:[39m test-node.js passed: detect: assets/human-sample-body.jpg movenet
|
||||
2021-05-29 18:30:26 [32mDATA: [39m test-node.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"confidence":1} {"score":0.7261000871658325,"class":"person"} {"score":0.93,"keypoints":17}
|
||||
2021-05-29 18:30:26 [32mDATA: [39m test-node.js result: performance: load: 345 total: 318
|
||||
2021-05-29 18:30:27 [35mSTATE:[39m test-node.js passed: detect: random default
|
||||
2021-05-29 18:30:27 [32mDATA: [39m test-node.js result: face: 0 body: 1 hand: 0 gesture: 0 object: 0 person: 0 {} {} {"score":0,"keypoints":0}
|
||||
2021-05-29 18:30:27 [32mDATA: [39m test-node.js result: performance: load: 345 total: 788
|
||||
2021-05-29 18:30:27 [36mINFO: [39m test-node.js test: first instance
|
||||
2021-05-29 18:30:27 [35mSTATE:[39m test-node.js passed: load image: assets/sample-me.jpg [1,700,700,3]
|
||||
2021-05-29 18:30:28 [35mSTATE:[39m test-node.js passed: detect: assets/sample-me.jpg default
|
||||
2021-05-29 18:30:28 [32mDATA: [39m test-node.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 2 person: 1 {"confidence":1,"age":39.2,"gender":"male"} {"score":0.6820425987243652,"class":"person"} {"score":0.67,"keypoints":7}
|
||||
2021-05-29 18:30:28 [32mDATA: [39m test-node.js result: performance: load: 345 total: 1516
|
||||
2021-05-29 18:30:28 [36mINFO: [39m test-node.js test: second instance
|
||||
2021-05-29 18:30:29 [35mSTATE:[39m test-node.js passed: load image: assets/sample-me.jpg [1,700,700,3]
|
||||
2021-05-29 18:30:30 [35mSTATE:[39m test-node.js passed: detect: assets/sample-me.jpg default
|
||||
2021-05-29 18:30:30 [32mDATA: [39m test-node.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 2 person: 1 {"confidence":1,"age":39.2,"gender":"male"} {"score":0.6820425987243652,"class":"person"} {"score":0.67,"keypoints":7}
|
||||
2021-05-29 18:30:30 [32mDATA: [39m test-node.js result: performance: load: 7 total: 1435
|
||||
2021-05-29 18:30:30 [36mINFO: [39m test-node.js test: concurrent
|
||||
2021-05-29 18:30:30 [35mSTATE:[39m test-node.js passed: load image: assets/human-sample-face.jpg [1,256,256,3]
|
||||
2021-05-29 18:30:30 [35mSTATE:[39m test-node.js passed: load image: assets/human-sample-face.jpg [1,256,256,3]
|
||||
2021-05-29 18:30:31 [35mSTATE:[39m test-node.js passed: load image: assets/human-sample-body.jpg [1,1200,1200,3]
|
||||
2021-05-29 18:30:32 [35mSTATE:[39m test-node.js passed: load image: assets/human-sample-body.jpg [1,1200,1200,3]
|
||||
2021-05-29 18:30:38 [35mSTATE:[39m test-node.js passed: detect: assets/human-sample-face.jpg default
|
||||
2021-05-29 18:30:38 [32mDATA: [39m test-node.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 1 person: 1 {"confidence":1,"age":23.6,"gender":"female"} {"score":0.8257162570953369,"class":"person"} {"score":0.73,"keypoints":17}
|
||||
2021-05-29 18:30:38 [32mDATA: [39m test-node.js result: performance: load: 345 total: 5657
|
||||
2021-05-29 18:30:38 [35mSTATE:[39m test-node.js passed: detect: assets/human-sample-face.jpg default
|
||||
2021-05-29 18:30:38 [32mDATA: [39m test-node.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 1 person: 1 {"confidence":1,"age":23.6,"gender":"female"} {"score":0.8257162570953369,"class":"person"} {"score":0.73,"keypoints":17}
|
||||
2021-05-29 18:30:38 [32mDATA: [39m test-node.js result: performance: load: 7 total: 5657
|
||||
2021-05-29 18:30:38 [35mSTATE:[39m test-node.js passed: detect: assets/human-sample-body.jpg default
|
||||
2021-05-29 18:30:38 [32mDATA: [39m test-node.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"confidence":1,"age":28.5,"gender":"female"} {"score":0.7273815870285034,"class":"person"} {"score":0.93,"keypoints":17}
|
||||
2021-05-29 18:30:38 [32mDATA: [39m test-node.js result: performance: load: 345 total: 5657
|
||||
2021-05-29 18:30:38 [35mSTATE:[39m test-node.js passed: detect: assets/human-sample-body.jpg default
|
||||
2021-05-29 18:30:38 [32mDATA: [39m test-node.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"confidence":1,"age":28.5,"gender":"female"} {"score":0.7273815870285034,"class":"person"} {"score":0.93,"keypoints":17}
|
||||
2021-05-29 18:30:38 [32mDATA: [39m test-node.js result: performance: load: 7 total: 5657
|
||||
2021-05-29 18:30:38 [36mINFO: [39m test-node.js test complete: 19401 ms
|
||||
2021-05-29 18:30:38 [36mINFO: [39m test-node-gpu.js start
|
||||
2021-05-29 18:30:39 [33mWARN: [39m test-node-gpu.js stderr: 2021-05-29 18:30:39.644962: 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-05-29 18:30:39 [33mWARN: [39m test-node-gpu.js stderr: 2021-05-29 18:30:39.887957: 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-05-29 18:30:39 [33mWARN: [39m test-node-gpu.js stderr: 2021-05-29 18:30:39.888022: 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-05-29 18:30:39 [35mSTATE:[39m test-node-gpu.js passed: create human
|
||||
2021-05-29 18:30:39 [36mINFO: [39m test-node-gpu.js human version: 1.9.4
|
||||
2021-05-29 18:30:39 [36mINFO: [39m test-node-gpu.js platform: linux x64 agent: NodeJS v16.0.0
|
||||
2021-05-29 18:30:39 [36mINFO: [39m test-node-gpu.js tfjs version: 3.6.0
|
||||
2021-05-29 18:30:40 [35mSTATE:[39m test-node-gpu.js passed: set backend: tensorflow
|
||||
2021-05-29 18:30:40 [35mSTATE:[39m test-node-gpu.js passed: load models
|
||||
2021-05-29 18:30:40 [35mSTATE:[39m test-node-gpu.js result: defined models: 14 loaded models: 6
|
||||
2021-05-29 18:30:40 [35mSTATE:[39m test-node-gpu.js passed: warmup: none default
|
||||
2021-05-29 18:30:42 [35mSTATE:[39m test-node-gpu.js passed: warmup: face default
|
||||
2021-05-29 18:30:42 [32mDATA: [39m test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"confidence":1,"age":23.6,"gender":"female"} {"score":0.8246909379959106,"class":"person"} {"score":0.73,"keypoints":5}
|
||||
2021-05-29 18:30:42 [32mDATA: [39m test-node-gpu.js result: performance: load: 348 total: 1692
|
||||
2021-05-29 18:30:43 [35mSTATE:[39m test-node-gpu.js passed: warmup: body default
|
||||
2021-05-29 18:30:43 [32mDATA: [39m test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"confidence":1,"age":29.5,"gender":"female"} {"score":0.7261000871658325,"class":"person"} {"score":0.93,"keypoints":17}
|
||||
2021-05-29 18:30:43 [32mDATA: [39m test-node-gpu.js result: performance: load: 348 total: 1521
|
||||
2021-05-29 18:30:43 [36mINFO: [39m test-node-gpu.js test body variants
|
||||
2021-05-29 18:30:44 [35mSTATE:[39m test-node-gpu.js passed: load image: assets/human-sample-body.jpg [1,1200,1200,3]
|
||||
2021-05-29 18:30:45 [35mSTATE:[39m test-node-gpu.js passed: detect: assets/human-sample-body.jpg posenet
|
||||
2021-05-29 18:30:45 [32mDATA: [39m test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"confidence":1} {"score":0.7261000871658325,"class":"person"} {"score":0.96,"keypoints":16}
|
||||
2021-05-29 18:30:45 [32mDATA: [39m test-node-gpu.js result: performance: load: 348 total: 1028
|
||||
2021-05-29 18:30:46 [35mSTATE:[39m test-node-gpu.js passed: load image: assets/human-sample-body.jpg [1,1200,1200,3]
|
||||
2021-05-29 18:30:46 [35mSTATE:[39m test-node-gpu.js passed: detect: assets/human-sample-body.jpg movenet
|
||||
2021-05-29 18:30:46 [32mDATA: [39m test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"confidence":1} {"score":0.7261000871658325,"class":"person"} {"score":0.93,"keypoints":17}
|
||||
2021-05-29 18:30:46 [32mDATA: [39m test-node-gpu.js result: performance: load: 348 total: 327
|
||||
2021-05-29 18:30:47 [35mSTATE:[39m test-node-gpu.js passed: detect: random default
|
||||
2021-05-29 18:30:47 [32mDATA: [39m test-node-gpu.js result: face: 0 body: 1 hand: 0 gesture: 0 object: 0 person: 0 {} {} {"score":0,"keypoints":0}
|
||||
2021-05-29 18:30:47 [32mDATA: [39m test-node-gpu.js result: performance: load: 348 total: 757
|
||||
2021-05-29 18:30:47 [36mINFO: [39m test-node-gpu.js test: first instance
|
||||
2021-05-29 18:30:48 [35mSTATE:[39m test-node-gpu.js passed: load image: assets/sample-me.jpg [1,700,700,3]
|
||||
2021-05-29 18:30:49 [35mSTATE:[39m test-node-gpu.js passed: detect: assets/sample-me.jpg default
|
||||
2021-05-29 18:30:49 [32mDATA: [39m test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 2 person: 1 {"confidence":1,"age":39.2,"gender":"male"} {"score":0.6820425987243652,"class":"person"} {"score":0.67,"keypoints":7}
|
||||
2021-05-29 18:30:49 [32mDATA: [39m test-node-gpu.js result: performance: load: 348 total: 1413
|
||||
2021-05-29 18:30:49 [36mINFO: [39m test-node-gpu.js test: second instance
|
||||
2021-05-29 18:30:50 [35mSTATE:[39m test-node-gpu.js passed: load image: assets/sample-me.jpg [1,700,700,3]
|
||||
2021-05-29 18:30:51 [35mSTATE:[39m test-node-gpu.js passed: detect: assets/sample-me.jpg default
|
||||
2021-05-29 18:30:51 [32mDATA: [39m test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 2 person: 1 {"confidence":1,"age":39.2,"gender":"male"} {"score":0.6820425987243652,"class":"person"} {"score":0.67,"keypoints":7}
|
||||
2021-05-29 18:30:51 [32mDATA: [39m test-node-gpu.js result: performance: load: 2 total: 1429
|
||||
2021-05-29 18:30:51 [36mINFO: [39m test-node-gpu.js test: concurrent
|
||||
2021-05-29 18:30:51 [35mSTATE:[39m test-node-gpu.js passed: load image: assets/human-sample-face.jpg [1,256,256,3]
|
||||
2021-05-29 18:30:51 [35mSTATE:[39m test-node-gpu.js passed: load image: assets/human-sample-face.jpg [1,256,256,3]
|
||||
2021-05-29 18:30:52 [35mSTATE:[39m test-node-gpu.js passed: load image: assets/human-sample-body.jpg [1,1200,1200,3]
|
||||
2021-05-29 18:30:53 [35mSTATE:[39m test-node-gpu.js passed: load image: assets/human-sample-body.jpg [1,1200,1200,3]
|
||||
2021-05-29 18:30:59 [35mSTATE:[39m test-node-gpu.js passed: detect: assets/human-sample-face.jpg default
|
||||
2021-05-29 18:30:59 [32mDATA: [39m test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 1 person: 1 {"confidence":1,"age":23.6,"gender":"female"} {"score":0.8257162570953369,"class":"person"} {"score":0.73,"keypoints":17}
|
||||
2021-05-29 18:30:59 [32mDATA: [39m test-node-gpu.js result: performance: load: 348 total: 5404
|
||||
2021-05-29 18:30:59 [35mSTATE:[39m test-node-gpu.js passed: detect: assets/human-sample-face.jpg default
|
||||
2021-05-29 18:30:59 [32mDATA: [39m test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 1 person: 1 {"confidence":1,"age":23.6,"gender":"female"} {"score":0.8257162570953369,"class":"person"} {"score":0.73,"keypoints":17}
|
||||
2021-05-29 18:30:59 [32mDATA: [39m test-node-gpu.js result: performance: load: 2 total: 5404
|
||||
2021-05-29 18:30:59 [35mSTATE:[39m test-node-gpu.js passed: detect: assets/human-sample-body.jpg default
|
||||
2021-05-29 18:30:59 [32mDATA: [39m test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"confidence":1,"age":28.5,"gender":"female"} {"score":0.7273815870285034,"class":"person"} {"score":0.93,"keypoints":17}
|
||||
2021-05-29 18:30:59 [32mDATA: [39m test-node-gpu.js result: performance: load: 348 total: 5404
|
||||
2021-05-29 18:30:59 [35mSTATE:[39m test-node-gpu.js passed: detect: assets/human-sample-body.jpg default
|
||||
2021-05-29 18:30:59 [32mDATA: [39m test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"confidence":1,"age":28.5,"gender":"female"} {"score":0.7273815870285034,"class":"person"} {"score":0.93,"keypoints":17}
|
||||
2021-05-29 18:30:59 [32mDATA: [39m test-node-gpu.js result: performance: load: 2 total: 5404
|
||||
2021-05-29 18:30:59 [36mINFO: [39m test-node-gpu.js test complete: 19062 ms
|
||||
2021-05-29 18:30:59 [36mINFO: [39m test-node-wasm.js start
|
||||
2021-05-29 18:30:59 [31mERROR:[39m test-node-wasm.js failed: model server: request to http://localhost:10030/models/ failed, reason: connect ECONNREFUSED 127.0.0.1:10030
|
||||
2021-05-29 18:30:59 [31mERROR:[39m test-node-wasm.js aborting test
|
||||
2021-05-29 18:30:59 [36mINFO: [39m status: {"passed":46,"failed":1}
|
||||
2021-05-30 18:44:32 [36mINFO: [39m @vladmandic/human version 2.0.0
|
||||
2021-05-30 18:44:32 [36mINFO: [39m User: vlado Platform: linux Arch: x64 Node: v16.0.0
|
||||
2021-05-30 18:44:32 [36mINFO: [39m tests: ["test-node.js","test-node-gpu.js","test-node-wasm.js"]
|
||||
2021-05-30 18:44:32 [36mINFO: [39m test-node.js start
|
||||
2021-05-30 18:44:34 [35mSTATE:[39m test-node.js passed: create human
|
||||
2021-05-30 18:44:34 [36mINFO: [39m test-node.js human version: 2.0.0
|
||||
2021-05-30 18:44:34 [36mINFO: [39m test-node.js platform: linux x64 agent: NodeJS v16.0.0
|
||||
2021-05-30 18:44:34 [36mINFO: [39m test-node.js tfjs version: 3.6.0
|
||||
2021-05-30 18:44:34 [35mSTATE:[39m test-node.js passed: set backend: tensorflow
|
||||
2021-05-30 18:44:34 [35mSTATE:[39m test-node.js passed: load models
|
||||
2021-05-30 18:44:34 [35mSTATE:[39m test-node.js result: defined models: 14 loaded models: 6
|
||||
2021-05-30 18:44:34 [35mSTATE:[39m test-node.js passed: warmup: none default
|
||||
2021-05-30 18:44:36 [35mSTATE:[39m test-node.js passed: warmup: face default
|
||||
2021-05-30 18:44:36 [32mDATA: [39m test-node.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"confidence":1,"age":23.6,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.73,"keypoints":5}
|
||||
2021-05-30 18:44:36 [32mDATA: [39m test-node.js result: performance: load: 351 total: 1597
|
||||
2021-05-30 18:44:38 [35mSTATE:[39m test-node.js passed: warmup: body default
|
||||
2021-05-30 18:44:38 [32mDATA: [39m test-node.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"confidence":1,"age":29.5,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.93,"keypoints":17}
|
||||
2021-05-30 18:44:38 [32mDATA: [39m test-node.js result: performance: load: 351 total: 1550
|
||||
2021-05-30 18:44:38 [36mINFO: [39m test-node.js test body variants
|
||||
2021-05-30 18:44:39 [35mSTATE:[39m test-node.js passed: load image: assets/human-sample-body.jpg [1,1200,1200,3]
|
||||
2021-05-30 18:44:40 [35mSTATE:[39m test-node.js passed: detect: assets/human-sample-body.jpg posenet
|
||||
2021-05-30 18:44:40 [32mDATA: [39m test-node.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"confidence":1} {"score":0.72,"class":"person"} {"score":0.96,"keypoints":16}
|
||||
2021-05-30 18:44:40 [32mDATA: [39m test-node.js result: performance: load: 351 total: 950
|
||||
2021-05-30 18:44:40 [35mSTATE:[39m test-node.js passed: load image: assets/human-sample-body.jpg [1,1200,1200,3]
|
||||
2021-05-30 18:44:41 [35mSTATE:[39m test-node.js passed: detect: assets/human-sample-body.jpg movenet
|
||||
2021-05-30 18:44:41 [32mDATA: [39m test-node.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"confidence":1} {"score":0.72,"class":"person"} {"score":0.93,"keypoints":17}
|
||||
2021-05-30 18:44:41 [32mDATA: [39m test-node.js result: performance: load: 351 total: 386
|
||||
2021-05-30 18:44:41 [35mSTATE:[39m test-node.js passed: detect: random default
|
||||
2021-05-30 18:44:41 [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-05-30 18:44:41 [32mDATA: [39m test-node.js result: performance: load: 351 total: 181
|
||||
2021-05-30 18:44:41 [36mINFO: [39m test-node.js test: first instance
|
||||
2021-05-30 18:44:42 [35mSTATE:[39m test-node.js passed: load image: assets/sample-me.jpg [1,700,700,3]
|
||||
2021-05-30 18:44:42 [35mSTATE:[39m test-node.js passed: detect: assets/sample-me.jpg default
|
||||
2021-05-30 18:44:42 [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.67,"keypoints":7}
|
||||
2021-05-30 18:44:42 [32mDATA: [39m test-node.js result: performance: load: 351 total: 113
|
||||
2021-05-30 18:44:42 [36mINFO: [39m test-node.js test: second instance
|
||||
2021-05-30 18:44:42 [35mSTATE:[39m test-node.js passed: load image: assets/sample-me.jpg [1,700,700,3]
|
||||
2021-05-30 18:44:43 [35mSTATE:[39m test-node.js passed: detect: assets/sample-me.jpg default
|
||||
2021-05-30 18:44:43 [32mDATA: [39m test-node.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 2 person: 1 {"confidence":1,"age":39.2,"gender":"male"} {"score":0.68,"class":"person"} {"score":0.67,"keypoints":7}
|
||||
2021-05-30 18:44:43 [32mDATA: [39m test-node.js result: performance: load: 3 total: 1446
|
||||
2021-05-30 18:44:43 [36mINFO: [39m test-node.js test: concurrent
|
||||
2021-05-30 18:44:44 [35mSTATE:[39m test-node.js passed: load image: assets/human-sample-face.jpg [1,256,256,3]
|
||||
2021-05-30 18:44:44 [35mSTATE:[39m test-node.js passed: load image: assets/human-sample-face.jpg [1,256,256,3]
|
||||
2021-05-30 18:44:45 [35mSTATE:[39m test-node.js passed: load image: assets/human-sample-body.jpg [1,1200,1200,3]
|
||||
2021-05-30 18:44:46 [35mSTATE:[39m test-node.js passed: load image: assets/human-sample-body.jpg [1,1200,1200,3]
|
||||
2021-05-30 18:44:51 [35mSTATE:[39m test-node.js passed: detect: assets/human-sample-face.jpg default
|
||||
2021-05-30 18:44:51 [32mDATA: [39m test-node.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 1 person: 1 {"confidence":1,"age":23.6,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.73,"keypoints":17}
|
||||
2021-05-30 18:44:51 [32mDATA: [39m test-node.js result: performance: load: 351 total: 5303
|
||||
2021-05-30 18:44:51 [35mSTATE:[39m test-node.js passed: detect: assets/human-sample-face.jpg default
|
||||
2021-05-30 18:44:51 [32mDATA: [39m test-node.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 1 person: 1 {"confidence":1,"age":23.6,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.73,"keypoints":17}
|
||||
2021-05-30 18:44:51 [32mDATA: [39m test-node.js result: performance: load: 3 total: 5303
|
||||
2021-05-30 18:44:51 [35mSTATE:[39m test-node.js passed: detect: assets/human-sample-body.jpg default
|
||||
2021-05-30 18:44:51 [32mDATA: [39m test-node.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"confidence":1,"age":28.5,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.93,"keypoints":17}
|
||||
2021-05-30 18:44:51 [32mDATA: [39m test-node.js result: performance: load: 351 total: 5303
|
||||
2021-05-30 18:44:51 [35mSTATE:[39m test-node.js passed: detect: assets/human-sample-body.jpg default
|
||||
2021-05-30 18:44:51 [32mDATA: [39m test-node.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"confidence":1,"age":28.5,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.93,"keypoints":17}
|
||||
2021-05-30 18:44:51 [32mDATA: [39m test-node.js result: performance: load: 3 total: 5303
|
||||
2021-05-30 18:44:51 [36mINFO: [39m test-node.js test complete: 16908 ms
|
||||
2021-05-30 18:44:51 [36mINFO: [39m test-node-gpu.js start
|
||||
2021-05-30 18:44:52 [33mWARN: [39m test-node-gpu.js stderr: 2021-05-30 18:44:52.591364: 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-05-30 18:44:52 [33mWARN: [39m test-node-gpu.js stderr: 2021-05-30 18:44:52.796392: 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-05-30 18:44:52 [33mWARN: [39m test-node-gpu.js stderr: 2021-05-30 18:44:52.796422: 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-05-30 18:44:52 [35mSTATE:[39m test-node-gpu.js passed: create human
|
||||
2021-05-30 18:44:52 [36mINFO: [39m test-node-gpu.js human version: 2.0.0
|
||||
2021-05-30 18:44:52 [36mINFO: [39m test-node-gpu.js platform: linux x64 agent: NodeJS v16.0.0
|
||||
2021-05-30 18:44:52 [36mINFO: [39m test-node-gpu.js tfjs version: 3.6.0
|
||||
2021-05-30 18:44:53 [35mSTATE:[39m test-node-gpu.js passed: set backend: tensorflow
|
||||
2021-05-30 18:44:53 [35mSTATE:[39m test-node-gpu.js passed: load models
|
||||
2021-05-30 18:44:53 [35mSTATE:[39m test-node-gpu.js result: defined models: 14 loaded models: 6
|
||||
2021-05-30 18:44:53 [35mSTATE:[39m test-node-gpu.js passed: warmup: none default
|
||||
2021-05-30 18:44:54 [35mSTATE:[39m test-node-gpu.js passed: warmup: face default
|
||||
2021-05-30 18:44:55 [32mDATA: [39m test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"confidence":1,"age":23.6,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.73,"keypoints":5}
|
||||
2021-05-30 18:44:55 [32mDATA: [39m test-node-gpu.js result: performance: load: 337 total: 1707
|
||||
2021-05-30 18:44:56 [35mSTATE:[39m test-node-gpu.js passed: warmup: body default
|
||||
2021-05-30 18:44:56 [32mDATA: [39m test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"confidence":1,"age":29.5,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.93,"keypoints":17}
|
||||
2021-05-30 18:44:56 [32mDATA: [39m test-node-gpu.js result: performance: load: 337 total: 1518
|
||||
2021-05-30 18:44:56 [36mINFO: [39m test-node-gpu.js test body variants
|
||||
2021-05-30 18:44:57 [35mSTATE:[39m test-node-gpu.js passed: load image: assets/human-sample-body.jpg [1,1200,1200,3]
|
||||
2021-05-30 18:44:58 [35mSTATE:[39m test-node-gpu.js passed: detect: assets/human-sample-body.jpg posenet
|
||||
2021-05-30 18:44:58 [32mDATA: [39m test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"confidence":1} {"score":0.72,"class":"person"} {"score":0.96,"keypoints":16}
|
||||
2021-05-30 18:44:58 [32mDATA: [39m test-node-gpu.js result: performance: load: 337 total: 1060
|
||||
2021-05-30 18:44:59 [35mSTATE:[39m test-node-gpu.js passed: load image: assets/human-sample-body.jpg [1,1200,1200,3]
|
||||
2021-05-30 18:44:59 [35mSTATE:[39m test-node-gpu.js passed: detect: assets/human-sample-body.jpg movenet
|
||||
2021-05-30 18:44:59 [32mDATA: [39m test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"confidence":1} {"score":0.72,"class":"person"} {"score":0.93,"keypoints":17}
|
||||
2021-05-30 18:44:59 [32mDATA: [39m test-node-gpu.js result: performance: load: 337 total: 321
|
||||
2021-05-30 18:45:00 [35mSTATE:[39m test-node-gpu.js passed: detect: random default
|
||||
2021-05-30 18:45:00 [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-05-30 18:45:00 [32mDATA: [39m test-node-gpu.js result: performance: load: 337 total: 182
|
||||
2021-05-30 18:45:00 [36mINFO: [39m test-node-gpu.js test: first instance
|
||||
2021-05-30 18:45:00 [35mSTATE:[39m test-node-gpu.js passed: load image: assets/sample-me.jpg [1,700,700,3]
|
||||
2021-05-30 18:45:00 [35mSTATE:[39m test-node-gpu.js passed: detect: assets/sample-me.jpg default
|
||||
2021-05-30 18:45:00 [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.67,"keypoints":7}
|
||||
2021-05-30 18:45:00 [32mDATA: [39m test-node-gpu.js result: performance: load: 337 total: 112
|
||||
2021-05-30 18:45:00 [36mINFO: [39m test-node-gpu.js test: second instance
|
||||
2021-05-30 18:45:01 [35mSTATE:[39m test-node-gpu.js passed: load image: assets/sample-me.jpg [1,700,700,3]
|
||||
2021-05-30 18:45:02 [35mSTATE:[39m test-node-gpu.js passed: detect: assets/sample-me.jpg default
|
||||
2021-05-30 18:45:02 [32mDATA: [39m test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 2 person: 1 {"confidence":1,"age":39.2,"gender":"male"} {"score":0.68,"class":"person"} {"score":0.67,"keypoints":7}
|
||||
2021-05-30 18:45:02 [32mDATA: [39m test-node-gpu.js result: performance: load: 4 total: 1445
|
||||
2021-05-30 18:45:02 [36mINFO: [39m test-node-gpu.js test: concurrent
|
||||
2021-05-30 18:45:02 [35mSTATE:[39m test-node-gpu.js passed: load image: assets/human-sample-face.jpg [1,256,256,3]
|
||||
2021-05-30 18:45:02 [35mSTATE:[39m test-node-gpu.js passed: load image: assets/human-sample-face.jpg [1,256,256,3]
|
||||
2021-05-30 18:45:03 [35mSTATE:[39m test-node-gpu.js passed: load image: assets/human-sample-body.jpg [1,1200,1200,3]
|
||||
2021-05-30 18:45:04 [35mSTATE:[39m test-node-gpu.js passed: load image: assets/human-sample-body.jpg [1,1200,1200,3]
|
||||
2021-05-30 18:45:09 [35mSTATE:[39m test-node-gpu.js passed: detect: assets/human-sample-face.jpg default
|
||||
2021-05-30 18:45:09 [32mDATA: [39m test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 1 person: 1 {"confidence":1,"age":23.6,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.73,"keypoints":17}
|
||||
2021-05-30 18:45:09 [32mDATA: [39m test-node-gpu.js result: performance: load: 337 total: 5272
|
||||
2021-05-30 18:45:09 [35mSTATE:[39m test-node-gpu.js passed: detect: assets/human-sample-face.jpg default
|
||||
2021-05-30 18:45:09 [32mDATA: [39m test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 1 person: 1 {"confidence":1,"age":23.6,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.73,"keypoints":17}
|
||||
2021-05-30 18:45:09 [32mDATA: [39m test-node-gpu.js result: performance: load: 4 total: 5272
|
||||
2021-05-30 18:45:09 [35mSTATE:[39m test-node-gpu.js passed: detect: assets/human-sample-body.jpg default
|
||||
2021-05-30 18:45:09 [32mDATA: [39m test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"confidence":1,"age":28.5,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.93,"keypoints":17}
|
||||
2021-05-30 18:45:09 [32mDATA: [39m test-node-gpu.js result: performance: load: 337 total: 5272
|
||||
2021-05-30 18:45:09 [35mSTATE:[39m test-node-gpu.js passed: detect: assets/human-sample-body.jpg default
|
||||
2021-05-30 18:45:09 [32mDATA: [39m test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 3 object: 1 person: 1 {"confidence":1,"age":28.5,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.93,"keypoints":17}
|
||||
2021-05-30 18:45:09 [32mDATA: [39m test-node-gpu.js result: performance: load: 4 total: 5272
|
||||
2021-05-30 18:45:09 [36mINFO: [39m test-node-gpu.js test complete: 17008 ms
|
||||
2021-05-30 18:45:09 [36mINFO: [39m test-node-wasm.js start
|
||||
2021-05-30 18:45:10 [31mERROR:[39m test-node-wasm.js failed: model server: request to http://localhost:10030/models/ failed, reason: connect ECONNREFUSED 127.0.0.1:10030
|
||||
2021-05-30 18:45:10 [31mERROR:[39m test-node-wasm.js aborting test
|
||||
2021-05-30 18:45:10 [36mINFO: [39m status: {"passed":46,"failed":1}
|
||||
|
|
|
@ -74,6 +74,11 @@
|
|||
<li>Results object definition: <a href="../interfaces/result.html">Result</a></li>
|
||||
<li>Possible inputs: <a href="../index.html#input">Input</a></li>
|
||||
</ul>
|
||||
<dl class="tsd-comment-tags">
|
||||
<dt>param</dt>
|
||||
<dd><p><a href="../interfaces/config.html">Config</a></p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-hierarchy">
|
||||
|
@ -141,9 +146,6 @@
|
|||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>Creates instance of Human library that is futher used for all operations</p>
|
||||
<ul>
|
||||
<li>@param userConfig: <a href="../interfaces/config.html">Config</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
|
@ -166,9 +168,11 @@
|
|||
<aside class="tsd-sources">
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>Internal: Currently loaded classes</p>
|
||||
</div>
|
||||
<dl class="tsd-comment-tags">
|
||||
<dt>internal:</dt>
|
||||
<dd><p>Currently loaded classes</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="tsd-type-declaration">
|
||||
<h4>Type declaration</h4>
|
||||
|
@ -430,9 +434,11 @@
|
|||
<aside class="tsd-sources">
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>Internal: Instance of current image being processed</p>
|
||||
</div>
|
||||
<dl class="tsd-comment-tags">
|
||||
<dt>internal:</dt>
|
||||
<dd><p>Instance of current image being processed</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="tsd-type-declaration">
|
||||
<h4>Type declaration</h4>
|
||||
|
@ -453,9 +459,11 @@
|
|||
<aside class="tsd-sources">
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>Internal: Currently loaded models</p>
|
||||
</div>
|
||||
<dl class="tsd-comment-tags">
|
||||
<dt>internal:</dt>
|
||||
<dd><p>Currently loaded models</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="tsd-type-declaration">
|
||||
<h4>Type declaration</h4>
|
||||
|
@ -577,12 +585,14 @@
|
|||
<aside class="tsd-sources">
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>Internal: Instance of TensorFlow/JS used by Human</p>
|
||||
<ul>
|
||||
<li>Can be embedded or externally provided</li>
|
||||
</ul>
|
||||
</div>
|
||||
<dl class="tsd-comment-tags">
|
||||
<dt>internal:</dt>
|
||||
<dd><p>Instance of TensorFlow/JS used by Human</p>
|
||||
<ul>
|
||||
<li>Can be embedded or externally provided</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
|
||||
|
@ -631,6 +641,7 @@
|
|||
</li>
|
||||
</ul>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</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">></span></h4>
|
||||
<p>result: Result</p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
@ -653,9 +664,6 @@
|
|||
<ul class="tsd-parameters">
|
||||
<li>
|
||||
<h5>input: <span class="tsd-signature-type">Tensor</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Rank</span><span class="tsd-signature-symbol">></span></h5>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<p>Tensor as provided in human.result.face[n].tensor</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Tensor</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Rank</span><span class="tsd-signature-symbol">></span></h4>
|
||||
|
@ -765,6 +773,7 @@
|
|||
</li>
|
||||
</ul>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4>
|
||||
<p>similarity: number</p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
* Configuration interface definition for **Human** library
|
||||
*
|
||||
* Contains all configurable parameters
|
||||
* @typedef Config
|
||||
*/
|
||||
export interface Config {
|
||||
/** Backend used for TFJS operations */
|
||||
|
|
|
@ -18,9 +18,13 @@ import { Tensor } from './tfjs/types';
|
|||
export type { Config } from './config';
|
||||
export type { Result, Face, Hand, Body, Item, Gesture } from './result';
|
||||
export type { DrawOptions } from './draw/draw';
|
||||
/** Defines all possible input types for **Human** detection */
|
||||
/** Defines all possible input types for **Human** detection
|
||||
* @typedef Input
|
||||
*/
|
||||
export declare type Input = Tensor | typeof Image | ImageData | ImageBitmap | HTMLImageElement | HTMLMediaElement | HTMLVideoElement | HTMLCanvasElement | OffscreenCanvas;
|
||||
/** Error message */
|
||||
/** Error message
|
||||
* @typedef Error
|
||||
*/
|
||||
export declare type Error = {
|
||||
error: string;
|
||||
};
|
||||
|
@ -36,6 +40,8 @@ declare type Model = unknown;
|
|||
* - Configuration object definition: {@link Config}
|
||||
* - Results object definition: {@link Result}
|
||||
* - Possible inputs: {@link Input}
|
||||
*
|
||||
* @param userConfig: {@link Config}
|
||||
*/
|
||||
export declare class Human {
|
||||
#private;
|
||||
|
@ -53,12 +59,12 @@ export declare class Human {
|
|||
* - Can be polled to determine operations that are currently executed
|
||||
*/
|
||||
state: string;
|
||||
/** Internal: Instance of current image being processed */
|
||||
/** @internal: Instance of current image being processed */
|
||||
image: {
|
||||
tensor: Tensor | null;
|
||||
canvas: OffscreenCanvas | HTMLCanvasElement | null;
|
||||
};
|
||||
/** Internal: Instance of TensorFlow/JS used by Human
|
||||
/** @internal: Instance of TensorFlow/JS used by Human
|
||||
* - Can be embedded or externally provided
|
||||
*/
|
||||
tf: TensorFlow;
|
||||
|
@ -79,7 +85,7 @@ export declare class Human {
|
|||
canvas: typeof draw.canvas;
|
||||
all: typeof draw.all;
|
||||
};
|
||||
/** Internal: Currently loaded models */
|
||||
/** @internal: Currently loaded models */
|
||||
models: {
|
||||
face: [Model, Model, Model] | null;
|
||||
posenet: Model | null;
|
||||
|
@ -96,7 +102,7 @@ export declare class Human {
|
|||
centernet: Model | null;
|
||||
faceres: Model | null;
|
||||
};
|
||||
/** Internal: Currently loaded classes */
|
||||
/** @internal: Currently loaded classes */
|
||||
classes: {
|
||||
facemesh: typeof facemesh;
|
||||
emotion: typeof emotion;
|
||||
|
@ -119,22 +125,24 @@ export declare class Human {
|
|||
perf: Record<string, unknown>;
|
||||
/**
|
||||
* Creates instance of Human library that is futher used for all operations
|
||||
* - @param userConfig: {@link Config}
|
||||
* @param userConfig: {@link Config}
|
||||
*/
|
||||
constructor(userConfig?: Config | Record<string, unknown>);
|
||||
/** @hidden */
|
||||
analyze: (...msg: any[]) => void;
|
||||
/** Simmilarity method calculates simmilarity between two provided face descriptors (face embeddings)
|
||||
* - Calculation is based on normalized Minkowski distance between
|
||||
* @param embedding1: face descriptor as array of numbers
|
||||
* @param embedding2: face descriptor as array of numbers
|
||||
* @returns similarity: number
|
||||
*/
|
||||
similarity(embedding1: Array<number>, embedding2: Array<number>): number;
|
||||
/** Enhance method performs additional enhacements to face image previously detected for futher processing
|
||||
* @param input Tensor as provided in human.result.face[n].tensor
|
||||
* @param input: Tensor as provided in human.result.face[n].tensor
|
||||
* @returns Tensor
|
||||
*/
|
||||
enhance(input: Tensor): Tensor | null;
|
||||
/**
|
||||
* Math method find best match between provided face descriptor and predefined database of known descriptors
|
||||
/** Math method find best match between provided face descriptor and predefined database of known descriptors
|
||||
* @param faceEmbedding: face descriptor previsouly calculated on any face
|
||||
* @param db: array of mapping of face descriptors to known values
|
||||
* @param threshold: minimum score for matching to be considered in the result
|
||||
|
@ -152,6 +160,7 @@ export declare class Human {
|
|||
};
|
||||
/** Load method preloads all configured models on-demand
|
||||
* - Not explicitly required as any required model is load implicitly on it's first run
|
||||
* @param userConfig: {@link Config}
|
||||
*/
|
||||
load(userConfig?: Config | Record<string, unknown>): Promise<void>;
|
||||
/** Main detection method
|
||||
|
@ -159,11 +168,15 @@ export declare class Human {
|
|||
* - Pre-process input: {@link Input}
|
||||
* - Run inference for all configured models
|
||||
* - Process and return result: {@link Result}
|
||||
* @param input: Input
|
||||
* @param userConfig: Config
|
||||
* @returns result: Result
|
||||
*/
|
||||
detect(input: Input, userConfig?: Config | Record<string, unknown>): Promise<Result | Error>;
|
||||
/** Warmup metho pre-initializes all models for faster inference
|
||||
* - can take significant time on startup
|
||||
* - only used for `webgl` and `humangl` backends
|
||||
* @param userConfig: Config
|
||||
*/
|
||||
warmup(userConfig?: Config | Record<string, unknown>): Promise<Result | {
|
||||
error: any;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Type definitions for Human results
|
||||
* Type definitions for Human result object
|
||||
*/
|
||||
import { Tensor } from '../dist/tfjs.esm.js';
|
||||
/** Face results
|
||||
|
|
Loading…
Reference in New Issue