redefine tensor

pull/91/head
Vladimir Mandic 2021-03-17 20:23:12 -04:00
parent 960bd66c31
commit 447d626584
12 changed files with 17 additions and 15 deletions

View File

@ -11,6 +11,7 @@ Repository: **<git+https://github.com/vladmandic/human.git>**
### **HEAD -> main** 2021/03/17 mandic00@live.com
- 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

2
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

View File

@ -2,7 +2,7 @@ import { log } from '../log';
import * as tf from '../../dist/tfjs.esm.js';
import * as profile from '../profile';
type Tensor = Object;
type Tensor = typeof tf.Tensor;
type DB = Array<{ name: string, source: string, embedding: number[] }>;
let model;

View File

@ -20,7 +20,7 @@ import { Result } from './result';
import * as sample from './sample';
import * as app from '../package.json';
type Tensor = Object;
type Tensor = typeof tf.Tensor;
type Model = Object;
export type { Config } from './config';

View File

@ -403,7 +403,7 @@
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
<a name="image" class="tsd-anchor"></a>
<h3>image</h3>
<div class="tsd-signature tsd-kind-icon">image<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span>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><span class="tsd-signature-symbol">; </span>tensor<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Object</span><span class="tsd-signature-symbol"> }</span></div>
<div class="tsd-signature tsd-kind-icon">image<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span>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><span class="tsd-signature-symbol">; </span>tensor<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">typeof </span><span class="tsd-signature-type">__class</span><span class="tsd-signature-symbol"> }</span></div>
<aside class="tsd-sources">
</aside>
<div class="tsd-type-declaration">
@ -413,7 +413,7 @@
<h5>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></h5>
</li>
<li class="tsd-parameter">
<h5>tensor<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Object</span></h5>
<h5>tensor<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">typeof </span><span class="tsd-signature-type">__class</span></h5>
</li>
</ul>
</div>
@ -529,7 +529,7 @@
<a name="enhance" class="tsd-anchor"></a>
<h3>enhance</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">enhance<span class="tsd-signature-symbol">(</span>input<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Object</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">Object</span></li>
<li class="tsd-signature tsd-kind-icon">enhance<span class="tsd-signature-symbol">(</span>input<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">typeof </span><span class="tsd-signature-type">__class</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-symbol">typeof </span><span class="tsd-signature-type">__class</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
@ -538,10 +538,10 @@
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>input: <span class="tsd-signature-type">Object</span></h5>
<h5>input: <span class="tsd-signature-symbol">typeof </span><span class="tsd-signature-type">__class</span></h5>
</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">Object</span></h4>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">typeof </span><span class="tsd-signature-type">__class</span></h4>
</li>
</ul>
</section>

View File

@ -1,4 +1,5 @@
declare type Tensor = Object;
import * as tf from '../../dist/tfjs.esm.js';
declare type Tensor = typeof tf.Tensor;
declare type DB = Array<{
name: string;
source: string;

2
types/human.d.ts vendored
View File

@ -10,7 +10,7 @@ import * as nanodet from './nanodet/nanodet';
import * as draw from './draw/draw';
import { Config } from './config';
import { Result } from './result';
declare type Tensor = Object;
declare type Tensor = typeof tf.Tensor;
declare type Model = Object;
export type { Config } from './config';
export type { Result } from './result';