mirror of https://github.com/vladmandic/human
added experimental results interpolation for smooth draw operations
parent
73d9986187
commit
4ed9e9f3a1
10
CHANGELOG.md
10
CHANGELOG.md
|
@ -1,6 +1,6 @@
|
|||
# @vladmandic/human
|
||||
|
||||
Version: **1.9.2**
|
||||
Version: **1.9.3**
|
||||
Description: **Human: AI-powered 3D Face Detection & Rotation Tracking, Face Description & Recognition, Body Pose Tracking, 3D Hand & Finger Tracking, Iris Analysis, Age & Gender & Emotion Prediction, Gesture Recognition**
|
||||
|
||||
Author: **Vladimir Mandic <mandic00@live.com>**
|
||||
|
@ -9,8 +9,14 @@ Repository: **<git+https://github.com/vladmandic/human.git>**
|
|||
|
||||
## Changelog
|
||||
|
||||
### **HEAD -> main** 2021/05/22 mandic00@live.com
|
||||
### **1.9.3** 2021/05/23 mandic00@live.com
|
||||
|
||||
- use green weighted for input diff calculation
|
||||
- implement experimental drawoptions.bufferedoutput and bufferedfactor
|
||||
|
||||
### **origin/main** 2021/05/22 mandic00@live.com
|
||||
|
||||
- add tfjs types and remove all instances of any
|
||||
- enhance strong typing
|
||||
- rebuild all for release
|
||||
|
||||
|
|
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
|
@ -19644,7 +19644,7 @@ lBhEMohlFerLlBjEMohMVTEARDKCITsAk2AEgAAAkAAAAAAAAAAAAAAAAAAAAAAAASAAAAAAAAD/
|
|||
2Q==`;
|
||||
|
||||
// package.json
|
||||
var version = "1.9.2";
|
||||
var version = "1.9.3";
|
||||
|
||||
// src/human.ts
|
||||
var _numTensors, _analyzeMemoryLeaks, _checkSanity, _firstRun, _lastInputSum, _lastCacheDiff, _sanity, _checkBackend, _skipFrame, _warmupBitmap, _warmupCanvas, _warmupNode;
|
||||
|
|
|
@ -19645,7 +19645,7 @@ lBhEMohlFerLlBjEMohMVTEARDKCITsAk2AEgAAAkAAAAAAAAAAAAAAAAAAAAAAAASAAAAAAAAD/
|
|||
2Q==`;
|
||||
|
||||
// package.json
|
||||
var version = "1.9.2";
|
||||
var version = "1.9.3";
|
||||
|
||||
// src/human.ts
|
||||
var _numTensors, _analyzeMemoryLeaks, _checkSanity, _firstRun, _lastInputSum, _lastCacheDiff, _sanity, _checkBackend, _skipFrame, _warmupBitmap, _warmupCanvas, _warmupNode;
|
||||
|
|
|
@ -19644,7 +19644,7 @@ lBhEMohlFerLlBjEMohMVTEARDKCITsAk2AEgAAAkAAAAAAAAAAAAAAAAAAAAAAAASAAAAAAAAD/
|
|||
2Q==`;
|
||||
|
||||
// package.json
|
||||
var version = "1.9.2";
|
||||
var version = "1.9.3";
|
||||
|
||||
// src/human.ts
|
||||
var _numTensors, _analyzeMemoryLeaks, _checkSanity, _firstRun, _lastInputSum, _lastCacheDiff, _sanity, _checkBackend, _skipFrame, _warmupBitmap, _warmupCanvas, _warmupNode;
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -86,3 +86,20 @@
|
|||
2021-05-22 21:52:13 [36mINFO: [39m Generate types: ["src/human.ts"]
|
||||
2021-05-22 21:52:18 [36mINFO: [39m Update Change log: ["/home/vlado/dev/human/CHANGELOG.md"]
|
||||
2021-05-22 21:52:18 [36mINFO: [39m Generate TypeDocs: ["src/human.ts"]
|
||||
2021-05-23 13:54:48 [36mINFO: [39m @vladmandic/human version 1.9.3
|
||||
2021-05-23 13:54:48 [36mINFO: [39m User: vlado Platform: linux Arch: x64 Node: v16.0.0
|
||||
2021-05-23 13:54:48 [36mINFO: [39m Build: file startup all type: production config: {"minifyWhitespace":true,"minifyIdentifiers":true,"minifySyntax":true}
|
||||
2021-05-23 13:54:48 [35mSTATE:[39m Build for: node type: tfjs: {"imports":1,"importBytes":39,"outputBytes":1292,"outputFiles":"dist/tfjs.esm.js"}
|
||||
2021-05-23 13:54:48 [35mSTATE:[39m Build for: node type: node: {"imports":36,"importBytes":425082,"outputBytes":381351,"outputFiles":"dist/human.node.js"}
|
||||
2021-05-23 13:54:48 [35mSTATE:[39m Build for: nodeGPU type: tfjs: {"imports":1,"importBytes":43,"outputBytes":1300,"outputFiles":"dist/tfjs.esm.js"}
|
||||
2021-05-23 13:54:48 [35mSTATE:[39m Build for: nodeGPU type: node: {"imports":36,"importBytes":425090,"outputBytes":381355,"outputFiles":"dist/human.node-gpu.js"}
|
||||
2021-05-23 13:54:48 [35mSTATE:[39m Build for: nodeWASM type: tfjs: {"imports":1,"importBytes":81,"outputBytes":1367,"outputFiles":"dist/tfjs.esm.js"}
|
||||
2021-05-23 13:54:48 [35mSTATE:[39m Build for: nodeWASM type: node: {"imports":36,"importBytes":425157,"outputBytes":381427,"outputFiles":"dist/human.node-wasm.js"}
|
||||
2021-05-23 13:54:48 [35mSTATE:[39m Build for: browserNoBundle type: tfjs: {"imports":1,"importBytes":2488,"outputBytes":1394,"outputFiles":"dist/tfjs.esm.js"}
|
||||
2021-05-23 13:54:48 [35mSTATE:[39m Build for: browserNoBundle type: esm: {"imports":36,"importBytes":425184,"outputBytes":234133,"outputFiles":"dist/human.esm-nobundle.js"}
|
||||
2021-05-23 13:54:49 [35mSTATE:[39m Build for: browserBundle type: tfjs: {"modules":1274,"moduleBytes":4114813,"imports":7,"importBytes":2488,"outputBytes":1111414,"outputFiles":"dist/tfjs.esm.js"}
|
||||
2021-05-23 13:54:50 [35mSTATE:[39m Build for: browserBundle type: iife: {"imports":36,"importBytes":1535204,"outputBytes":1342022,"outputFiles":"dist/human.js"}
|
||||
2021-05-23 13:54:50 [35mSTATE:[39m Build for: browserBundle type: esm: {"imports":36,"importBytes":1535204,"outputBytes":1342014,"outputFiles":"dist/human.esm.js"}
|
||||
2021-05-23 13:54:50 [36mINFO: [39m Generate types: ["src/human.ts"]
|
||||
2021-05-23 13:54:56 [36mINFO: [39m Update Change log: ["/home/vlado/dev/human/CHANGELOG.md"]
|
||||
2021-05-23 13:54:56 [36mINFO: [39m Generate TypeDocs: ["src/human.ts"]
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -112,14 +112,14 @@
|
|||
<h2>Properties</h2>
|
||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||
<a name="box" class="tsd-anchor"></a>
|
||||
<h3><span class="tsd-flag ts-flagOptional">Optional</span> box</h3>
|
||||
<h3>box</h3>
|
||||
<div class="tsd-signature tsd-kind-icon">box<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">[</span>x<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span>y<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span>width<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span>height<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span></div>
|
||||
<aside class="tsd-sources">
|
||||
</aside>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||
<a name="boxraw" class="tsd-anchor"></a>
|
||||
<h3><span class="tsd-flag ts-flagOptional">Optional</span> box<wbr>Raw</h3>
|
||||
<h3>box<wbr>Raw</h3>
|
||||
<div class="tsd-signature tsd-kind-icon">box<wbr>Raw<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">[</span>x<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span>y<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span>width<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span>height<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span></div>
|
||||
<aside class="tsd-sources">
|
||||
</aside>
|
||||
|
|
|
@ -84,6 +84,7 @@
|
|||
-useDepth: use z-axis coordinate as color shade,
|
||||
-useCurves: draw polygons as cures or as lines,
|
||||
-bufferedOutput: experimental: allows to call draw methods multiple times for each detection and interpolate results between results thus achieving smoother animations
|
||||
-bufferedFactor: speed of interpolation convergence where 1 means 100% immediately, 2 means 50% at each interpolation, etc.
|
||||
-useRawBoxes: Boolean: internal: use non-normalized coordinates when performing draw methods,</p>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -103,6 +104,7 @@
|
|||
<section class="tsd-index-section ">
|
||||
<h3>Properties</h3>
|
||||
<ul class="tsd-index-list">
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="drawoptions.html#bufferedfactor" class="tsd-kind-icon">buffered<wbr>Factor</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="drawoptions.html#bufferedoutput" class="tsd-kind-icon">buffered<wbr>Output</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="drawoptions.html#calculatehandbox" class="tsd-kind-icon">calculate<wbr>Hand<wbr>Box</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="drawoptions.html#color" class="tsd-kind-icon">color</a></li>
|
||||
|
@ -128,6 +130,13 @@
|
|||
</section>
|
||||
<section class="tsd-panel-group tsd-member-group ">
|
||||
<h2>Properties</h2>
|
||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||
<a name="bufferedfactor" class="tsd-anchor"></a>
|
||||
<h3>buffered<wbr>Factor</h3>
|
||||
<div class="tsd-signature tsd-kind-icon">buffered<wbr>Factor<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
|
||||
<aside class="tsd-sources">
|
||||
</aside>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||
<a name="bufferedoutput" class="tsd-anchor"></a>
|
||||
<h3>buffered<wbr>Output</h3>
|
||||
|
@ -283,6 +292,9 @@
|
|||
<li class="current tsd-kind-interface">
|
||||
<a href="drawoptions.html" class="tsd-kind-icon">Draw<wbr>Options</a>
|
||||
<ul>
|
||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
||||
<a href="drawoptions.html#bufferedfactor" class="tsd-kind-icon">buffered<wbr>Factor</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
||||
<a href="drawoptions.html#bufferedoutput" class="tsd-kind-icon">buffered<wbr>Output</a>
|
||||
</li>
|
||||
|
|
|
@ -107,7 +107,7 @@
|
|||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||
<a name="canvas" class="tsd-anchor"></a>
|
||||
<h3>canvas</h3>
|
||||
<h3><span class="tsd-flag ts-flagOptional">Optional</span> canvas</h3>
|
||||
<div class="tsd-signature tsd-kind-icon">canvas<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">HTMLCanvasElement</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">OffscreenCanvas</span></div>
|
||||
<aside class="tsd-sources">
|
||||
</aside>
|
||||
|
|
|
@ -1,15 +1,3 @@
|
|||
import { Body } from '../result';
|
||||
export declare function load(config: any): Promise<any>;
|
||||
export declare function predict(image: any, config: any): Promise<{
|
||||
score: any;
|
||||
keypoints: {
|
||||
id: any;
|
||||
part: any;
|
||||
position: {
|
||||
x;
|
||||
y;
|
||||
z;
|
||||
};
|
||||
score: any;
|
||||
presence: any;
|
||||
}[];
|
||||
}[] | null>;
|
||||
export declare function predict(image: any, config: any): Promise<Body[]>;
|
||||
|
|
|
@ -18,6 +18,7 @@ import type { Result, Face, Body, Hand, Item, Gesture } from '../result';
|
|||
* -useDepth: use z-axis coordinate as color shade,
|
||||
* -useCurves: draw polygons as cures or as lines,
|
||||
* -bufferedOutput: experimental: allows to call draw methods multiple times for each detection and interpolate results between results thus achieving smoother animations
|
||||
* -bufferedFactor: speed of interpolation convergence where 1 means 100% immediately, 2 means 50% at each interpolation, etc.
|
||||
* -useRawBoxes: Boolean: internal: use non-normalized coordinates when performing draw methods,
|
||||
*/
|
||||
export interface DrawOptions {
|
||||
|
@ -37,6 +38,7 @@ export interface DrawOptions {
|
|||
useDepth: boolean;
|
||||
useCurves: boolean;
|
||||
bufferedOutput: boolean;
|
||||
bufferedFactor: number;
|
||||
useRawBoxes: boolean;
|
||||
calculateHandBox: boolean;
|
||||
}
|
||||
|
|
|
@ -79,8 +79,8 @@ export interface Face {
|
|||
export interface Body {
|
||||
id: number;
|
||||
score: number;
|
||||
box?: [x: number, y: number, width: number, height: number];
|
||||
boxRaw?: [x: number, y: number, width: number, height: number];
|
||||
box: [x: number, y: number, width: number, height: number];
|
||||
boxRaw: [x: number, y: number, width: number, height: number];
|
||||
keypoints: Array<{
|
||||
part: string;
|
||||
position: {
|
||||
|
@ -171,6 +171,6 @@ export interface Result {
|
|||
/** {@link Object}: detection & analysis results */
|
||||
object: Array<Item>;
|
||||
performance: Record<string, unknown>;
|
||||
canvas: OffscreenCanvas | HTMLCanvasElement;
|
||||
canvas?: OffscreenCanvas | HTMLCanvasElement;
|
||||
timestamp: number;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue