Skip to content

Commit 4caa0f1

Browse files
check in latest build
1 parent cff4966 commit 4caa0f1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+863
-647
lines changed

build/NetInput.d.ts

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,26 @@
1-
import { Dimensions, TMediaElement } from './types';
1+
import * as tf from '@tensorflow/tfjs-core';
2+
import { Point } from './Point';
3+
import { TResolvedNetInput } from './types';
24
export declare class NetInput {
3-
private _canvases;
4-
constructor(medias: Array<TMediaElement>, dims?: Dimensions);
5-
private initCanvas(media, dims?);
6-
readonly canvases: HTMLCanvasElement[];
7-
readonly width: number;
8-
readonly height: number;
9-
readonly dims: Dimensions | null;
5+
private _inputs;
6+
private _isManaged;
7+
private _inputDimensions;
8+
private _paddings;
9+
constructor(inputs: tf.Tensor4D | Array<TResolvedNetInput>);
10+
readonly inputs: tf.Tensor3D[];
11+
readonly isManaged: boolean;
12+
readonly batchSize: number;
13+
readonly inputDimensions: number[][];
14+
readonly paddings: Point[];
15+
getInputDimensions(batchIdx: number): number[];
16+
getInputHeight(batchIdx: number): number;
17+
getInputWidth(batchIdx: number): number;
18+
getPaddings(batchIdx: number): Point;
19+
toBatchTensor(inputSize: number, isCenterInputs?: boolean): tf.Tensor4D;
20+
/**
21+
* By setting the isManaged flag, all newly created tensors will be automatically
22+
* automatically disposed after the batch tensor has been created
23+
*/
24+
managed(): this;
25+
dispose(): void;
1026
}

build/NetInput.js

Lines changed: 82 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/NetInput.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/allFacesFactory.d.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import * as tf from '@tensorflow/tfjs-core';
21
import { FaceDetectionNet } from './faceDetectionNet/FaceDetectionNet';
32
import { FaceLandmarkNet } from './faceLandmarkNet/FaceLandmarkNet';
43
import { FaceRecognitionNet } from './faceRecognitionNet/FaceRecognitionNet';
54
import { FullFaceDescription } from './FullFaceDescription';
6-
import { NetInput } from './NetInput';
7-
export declare function allFacesFactory(detectionNet: FaceDetectionNet, landmarkNet: FaceLandmarkNet, recognitionNet: FaceRecognitionNet): (input: string | HTMLCanvasElement | HTMLImageElement | HTMLVideoElement | (string | HTMLCanvasElement | HTMLImageElement | HTMLVideoElement)[] | tf.Tensor<tf.Rank> | NetInput, minConfidence: number) => Promise<FullFaceDescription[]>;
5+
import { TNetInput } from './types';
6+
export declare function allFacesFactory(detectionNet: FaceDetectionNet, landmarkNet: FaceLandmarkNet, recognitionNet: FaceRecognitionNet): (input: TNetInput, minConfidence: number) => Promise<FullFaceDescription[]>;

build/allFacesFactory.js

Lines changed: 11 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/allFacesFactory.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/commons/getImageTensor.js

Lines changed: 6 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/commons/getImageTensor.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/commons/isMediaElement.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export declare function isMediaElement(input: any): boolean;

build/commons/isMediaElement.js

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)