pull/91/head
Vladimir Mandic 2021-03-17 20:26:43 -04:00
parent 447d626584
commit 71cb78abda
16 changed files with 69 additions and 34 deletions

View File

@ -11,6 +11,7 @@ Repository: **<git+https://github.com/vladmandic/human.git>**
### **HEAD -> main** 2021/03/17 mandic00@live.com
- enforce types
- regen type declarations
- switch to single jumbo dts
- type definitions

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

4
dist/human.js.map vendored

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

14
dist/human.node.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -20,17 +20,18 @@ import { Result } from './result';
import * as sample from './sample';
import * as app from '../package.json';
type Tensor = typeof tf.Tensor;
type Model = Object;
/** Generic Tensor object type */
export type Tensor = typeof tf.Tensor;
export type { Config } from './config';
export type { Result } from './result';
/** Defines all possible input types for **Human** detection */
export type Input = Tensor | ImageData | ImageBitmap | HTMLVideoElement | HTMLCanvasElement | OffscreenCanvas;
/** Error message */
export type Error = { error: string };
/** Instance of TensorFlow/JS */
export type TensorFlow = typeof tf;
/** Generic Model object type, holds instance of individual models */
type Model = Object;
// helper function: gets elapsed time on both browser and nodejs
const now = () => {

File diff suppressed because one or more lines are too long

View File

@ -749,6 +749,9 @@
<li class=" tsd-kind-type-alias">
<a href="../index.html#input" class="tsd-kind-icon">Input</a>
</li>
<li class=" tsd-kind-type-alias">
<a href="../index.html#tensor" class="tsd-kind-icon">Tensor</a>
</li>
<li class=" tsd-kind-type-alias">
<a href="../index.html#tensorflow" class="tsd-kind-icon">Tensor<wbr>Flow</a>
</li>

View File

@ -83,6 +83,7 @@
<ul class="tsd-index-list">
<li class="tsd-kind-type-alias"><a href="index.html#error" class="tsd-kind-icon">Error</a></li>
<li class="tsd-kind-type-alias"><a href="index.html#input" class="tsd-kind-icon">Input</a></li>
<li class="tsd-kind-type-alias"><a href="index.html#tensor" class="tsd-kind-icon">Tensor</a></li>
<li class="tsd-kind-type-alias"><a href="index.html#tensorflow" class="tsd-kind-icon">Tensor<wbr>Flow</a></li>
</ul>
</section>
@ -122,7 +123,7 @@
<section class="tsd-panel tsd-member tsd-kind-type-alias">
<a name="input" class="tsd-anchor"></a>
<h3>Input</h3>
<div class="tsd-signature tsd-kind-icon">Input<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Tensor</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">ImageData</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">ImageBitmap</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">HTMLVideoElement</span><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>
<div class="tsd-signature tsd-kind-icon">Input<span class="tsd-signature-symbol">:</span> <a href="index.html#tensor" class="tsd-signature-type" data-tsd-kind="Type alias">Tensor</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">ImageData</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">ImageBitmap</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">HTMLVideoElement</span><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>
<div class="tsd-comment tsd-typography">
@ -131,12 +132,29 @@
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-type-alias">
<a name="tensor" class="tsd-anchor"></a>
<h3>Tensor</h3>
<div class="tsd-signature tsd-kind-icon">Tensor<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">typeof </span><span class="tsd-signature-type">tf.Tensor</span></div>
<aside class="tsd-sources">
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Generic Tensor object type</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-type-alias">
<a name="tensorflow" class="tsd-anchor"></a>
<h3>Tensor<wbr>Flow</h3>
<div class="tsd-signature tsd-kind-icon">Tensor<wbr>Flow<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">typeof </span><span class="tsd-signature-type">tf</span></div>
<aside class="tsd-sources">
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Instance of TensorFlow/JS</p>
</div>
</div>
</section>
</section>
</div>
@ -168,6 +186,9 @@
<li class=" tsd-kind-type-alias">
<a href="index.html#input" class="tsd-kind-icon">Input</a>
</li>
<li class=" tsd-kind-type-alias">
<a href="index.html#tensor" class="tsd-kind-icon">Tensor</a>
</li>
<li class=" tsd-kind-type-alias">
<a href="index.html#tensorflow" class="tsd-kind-icon">Tensor<wbr>Flow</a>
</li>

View File

@ -570,6 +570,9 @@
<li class=" tsd-kind-type-alias">
<a href="../index.html#input" class="tsd-kind-icon">Input</a>
</li>
<li class=" tsd-kind-type-alias">
<a href="../index.html#tensor" class="tsd-kind-icon">Tensor</a>
</li>
<li class=" tsd-kind-type-alias">
<a href="../index.html#tensorflow" class="tsd-kind-icon">Tensor<wbr>Flow</a>
</li>

View File

@ -293,6 +293,9 @@
<li class=" tsd-kind-type-alias">
<a href="../index.html#input" class="tsd-kind-icon">Input</a>
</li>
<li class=" tsd-kind-type-alias">
<a href="../index.html#tensor" class="tsd-kind-icon">Tensor</a>
</li>
<li class=" tsd-kind-type-alias">
<a href="../index.html#tensorflow" class="tsd-kind-icon">Tensor<wbr>Flow</a>
</li>

7
types/human.d.ts vendored
View File

@ -10,8 +10,8 @@ import * as nanodet from './nanodet/nanodet';
import * as draw from './draw/draw';
import { Config } from './config';
import { Result } from './result';
declare type Tensor = typeof tf.Tensor;
declare type Model = Object;
/** Generic Tensor object type */
export declare type Tensor = typeof tf.Tensor;
export type { Config } from './config';
export type { Result } from './result';
/** Defines all possible input types for **Human** detection */
@ -20,7 +20,10 @@ export declare type Input = Tensor | ImageData | ImageBitmap | HTMLVideoElement
export declare type Error = {
error: string;
};
/** Instance of TensorFlow/JS */
export declare type TensorFlow = typeof tf;
/** Generic Model object type, holds instance of individual models */
declare type Model = Object;
/**
* **Human** library main class
*