Skip to content

Commit ad62d76

Browse files
check in latest build
1 parent b7c3c3b commit ad62d76

File tree

138 files changed

+3723
-1269
lines changed

Some content is hidden

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

138 files changed

+3723
-1269
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Check out my article **[face-api.js — JavaScript API for Face Recognition
1616
* **[Loading the Models](#usage-load-models)**
1717
* **[Face Detection - SSD Mobilenet v1](#usage-face-detection-ssd)**
1818
* **[Face Detection & 5 Point Face Landmarks - MTCNN](#usage-face-detection-mtcnn)**
19-
* **[Face Recognition - FaceNet](#usage-face-recognition)**
19+
* **[Face Recognition](#usage-face-recognition)**
2020
* **[68 Point Face Landmark Detection](#usage-face-landmark-detection)**
2121
* **[Full Face Detection and Recognition Pipeline](#usage-full-face-detection-and-recognition-pipeline)**
2222

@@ -86,7 +86,7 @@ MTCNN has been presented in the paper [Joint Face Detection and Alignment using
8686

8787
<a name="about-face-recognition"></a>
8888

89-
### Face Recognition - FaceNet
89+
### Face Recognition
9090

9191
For face recognition, a ResNet-34 like architecture is implemented to compute a face descriptor (a feature vector with 128 values) from any given face image, which is used to describe the characteristics of a persons face. The model is **not** limited to the set of faces used for training, meaning you can use it for face recognition of any person, for example yourself. You can determine the similarity of two arbitrary faces by comparing their face descriptors, for example by computing the euclidean distance or using any other classifier of your choice.
9292

build/FaceDetection.d.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { Rect } from './Rect';
2+
import { Dimensions } from './types';
3+
export declare class FaceDetection {
4+
private _score;
5+
private _box;
6+
private _imageWidth;
7+
private _imageHeight;
8+
constructor(score: number, relativeBox: Rect, imageDims: Dimensions);
9+
readonly score: number;
10+
readonly box: Rect;
11+
readonly imageWidth: number;
12+
readonly imageHeight: number;
13+
readonly relativeBox: Rect;
14+
getScore(): number;
15+
getBox(): Rect;
16+
getImageWidth(): number;
17+
getImageHeight(): number;
18+
getRelativeBox(): Rect;
19+
forSize(width: number, height: number): FaceDetection;
20+
}

build/FaceDetection.js

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

build/FaceDetection.js.map

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

build/FaceLandmarks.d.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { Point } from './Point';
2+
import { Dimensions } from './types';
3+
export declare class FaceLandmarks {
4+
protected _imageWidth: number;
5+
protected _imageHeight: number;
6+
protected _shift: Point;
7+
protected _faceLandmarks: Point[];
8+
constructor(relativeFaceLandmarkPositions: Point[], imageDims: Dimensions, shift?: Point);
9+
getShift(): Point;
10+
getImageWidth(): number;
11+
getImageHeight(): number;
12+
getPositions(): Point[];
13+
getRelativePositions(): Point[];
14+
}

build/FaceLandmarks.js

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

build/FaceLandmarks.js.map

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

build/FullFaceDescription.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import { FaceDetection } from './faceDetectionNet/FaceDetection';
2-
import { FaceLandmarks } from './faceLandmarkNet/FaceLandmarks';
1+
import { FaceDetection } from './FaceDetection';
2+
import { FaceLandmarks68 } from './faceLandmarkNet/FaceLandmarks68';
33
export declare class FullFaceDescription {
44
private _detection;
55
private _landmarks;
66
private _descriptor;
7-
constructor(_detection: FaceDetection, _landmarks: FaceLandmarks, _descriptor: Float32Array);
7+
constructor(_detection: FaceDetection, _landmarks: FaceLandmarks68, _descriptor: Float32Array);
88
readonly detection: FaceDetection;
9-
readonly landmarks: FaceLandmarks;
9+
readonly landmarks: FaceLandmarks68;
1010
readonly descriptor: Float32Array;
1111
forSize(width: number, height: number): FullFaceDescription;
1212
}

build/FullFaceDescription.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/NetInput.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@ import { Point } from './Point';
33
import { TResolvedNetInput } from './types';
44
export declare class NetInput {
55
private _inputs;
6+
private _canvases;
67
private _isManaged;
78
private _isBatchInput;
89
private _inputDimensions;
910
private _paddings;
10-
constructor(inputs: tf.Tensor4D | Array<TResolvedNetInput>, isBatchInput?: boolean);
11+
constructor(inputs: tf.Tensor4D | Array<TResolvedNetInput>, isBatchInput?: boolean, keepCanvases?: boolean);
1112
readonly inputs: tf.Tensor3D[];
13+
readonly canvases: HTMLCanvasElement[];
1214
readonly isManaged: boolean;
1315
readonly isBatchInput: boolean;
1416
readonly batchSize: number;

build/NetInput.js

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

0 commit comments

Comments
 (0)