strong type for string enums

pull/233/head
Vladimir Mandic 2021-12-15 09:26:32 -05:00
parent b162c4b775
commit 2d853e51bb
46 changed files with 1017 additions and 754 deletions

View File

@ -9,8 +9,9 @@
## Changelog ## Changelog
### **HEAD -> main** 2021/12/13 mandic00@live.com ### **HEAD -> main** 2021/12/14 mandic00@live.com
- rebuild
- fix node detection in electron environment - fix node detection in electron environment
### **2.5.5** 2021/12/01 mandic00@live.com ### **2.5.5** 2021/12/01 mandic00@live.com

View File

@ -10,7 +10,6 @@
- Advanced histogram equalization: Adaptive, Contrast Limited, CLAHE - Advanced histogram equalization: Adaptive, Contrast Limited, CLAHE
- TFLite models: <https://js.tensorflow.org/api_tflite/0.0.1-alpha.4/> - TFLite models: <https://js.tensorflow.org/api_tflite/0.0.1-alpha.4/>
- Body segmentation: `robust-video-matting` - Body segmentation: `robust-video-matting`
- TFJS incompatibility with latest `long.js` 5.0.0 due to CJS to ESM switch
<br><hr><br> <br><hr><br>
@ -57,3 +56,4 @@ Other:
- Fix face detect box scale and rotation - Fix face detect box scale and rotation
- Fix body interpolation - Fix body interpolation
- Updated `blazepose` implementation - Updated `blazepose` implementation
- Strong typing for all string enums in `config` and `results`

58
dist/human.d.ts vendored
View File

@ -29,6 +29,12 @@ export declare type BackendType = ['cpu', 'wasm', 'webgl', 'humangl', 'tensorflo
/** draw detected bodies */ /** draw detected bodies */
declare function body(inCanvas: AnyCanvas, result: Array<BodyResult>, drawOptions?: Partial<DrawOptions>): Promise<void>; declare function body(inCanvas: AnyCanvas, result: Array<BodyResult>, drawOptions?: Partial<DrawOptions>): Promise<void>;
export declare type BodyAnnotation = BodyAnnotationBlazePose | BodyAnnotationEfficientPose;
export declare type BodyAnnotationBlazePose = 'leftLeg' | 'rightLeg' | 'torso' | 'leftArm' | 'rightArm' | 'leftEye' | 'rightEye' | 'mouth';
export declare type BodyAnnotationEfficientPose = 'leftLeg' | 'rightLeg' | 'torso' | 'leftArm' | 'rightArm' | 'head';
/** Configures all body detection specific options */ /** Configures all body detection specific options */
export declare interface BodyConfig extends GenericConfig { export declare interface BodyConfig extends GenericConfig {
/** maximum numboer of detected bodies */ /** maximum numboer of detected bodies */
@ -43,7 +49,7 @@ export declare type BodyGesture = `leaning ${'left' | 'right'}` | `raise ${'left
/** Body Result keypoints */ /** Body Result keypoints */
export declare interface BodyKeypoint { export declare interface BodyKeypoint {
/** body part name */ /** body part name */
part: string; part: BodyLandmark;
/** body part position */ /** body part position */
position: Point; position: Point;
/** body part position normalized to 0..1 */ /** body part position normalized to 0..1 */
@ -52,6 +58,16 @@ export declare interface BodyKeypoint {
score: number; score: number;
} }
export declare type BodyLandmark = BodyLandmarkPoseNet | BodyLandmarkMoveNet | BodyLandmarkEfficientNet | BodyLandmarkBlazePose;
export declare type BodyLandmarkBlazePose = 'nose' | 'leftEyeInside' | 'leftEye' | 'leftEyeOutside' | 'rightEyeInside' | 'rightEye' | 'rightEyeOutside' | 'leftEar' | 'rightEar' | 'leftMouth' | 'rightMouth' | 'leftShoulder' | 'rightShoulder' | 'leftElbow' | 'rightElbow' | 'leftWrist' | 'rightWrist' | 'leftPinky' | 'rightPinky' | 'leftIndex' | 'rightIndex' | 'leftThumb' | 'rightThumb' | 'leftHip' | 'rightHip' | 'leftKnee' | 'rightKnee' | 'leftAnkle' | 'rightAnkle' | 'leftHeel' | 'rightHeel' | 'leftFoot' | 'rightFoot' | 'bodyCenter' | 'bodyTop' | 'leftPalm' | 'leftHand' | 'rightPalm' | 'rightHand';
export declare type BodyLandmarkEfficientNet = 'head' | 'neck' | 'rightShoulder' | 'rightElbow' | 'rightWrist' | 'chest' | 'leftShoulder' | 'leftElbow' | 'leftWrist' | 'bodyCenter' | 'rightHip' | 'rightKnee' | 'rightAnkle' | 'leftHip' | 'leftKnee' | 'leftAnkle';
export declare type BodyLandmarkMoveNet = 'nose' | 'leftEye' | 'rightEye' | 'leftEar' | 'rightEar' | 'leftShoulder' | 'rightShoulder' | 'leftElbow' | 'rightElbow' | 'leftWrist' | 'rightWrist' | 'leftHip' | 'rightHip' | 'leftKnee' | 'rightKnee' | 'leftAnkle' | 'rightAnkle';
export declare type BodyLandmarkPoseNet = 'nose' | 'leftEye' | 'rightEye' | 'leftEar' | 'rightEar' | 'leftShoulder' | 'rightShoulder' | 'leftElbow' | 'rightElbow' | 'leftWrist' | 'rightWrist' | 'leftHip' | 'rightHip' | 'leftKnee' | 'rightKnee' | 'leftAnkle' | 'rightAnkle';
/** Body results */ /** Body results */
export declare interface BodyResult { export declare interface BodyResult {
/** body id */ /** body id */
@ -65,7 +81,7 @@ export declare interface BodyResult {
/** detected body keypoints */ /** detected body keypoints */
keypoints: Array<BodyKeypoint>; keypoints: Array<BodyKeypoint>;
/** detected body keypoints combined into annotated parts */ /** detected body keypoints combined into annotated parts */
annotations: Record<string, Array<Point[]>>; annotations: Record<BodyAnnotation, Point[][]>;
} }
/** generic box as [x, y, width, height] */ /** generic box as [x, y, width, height] */
@ -356,6 +372,8 @@ export declare type DrawOptions = {
useCurves: boolean; useCurves: boolean;
}; };
export declare type Emotion = 'angry' | 'disgust' | 'fear' | 'happy' | 'sad' | 'surprise' | 'neutral';
/** /**
* Encode a map from names to weight values as an ArrayBuffer, along with an * Encode a map from names to weight values as an ArrayBuffer, along with an
* `Array` of `WeightsManifestEntry` as specification of the encoded weights. * `Array` of `WeightsManifestEntry` as specification of the encoded weights.
@ -519,6 +537,8 @@ export declare type FaceGesture = `facing ${'left' | 'center' | 'right'}` | `bli
export declare interface FaceIrisConfig extends GenericConfig { export declare interface FaceIrisConfig extends GenericConfig {
} }
export declare type FaceLandmark = 'leftEye' | 'rightEye' | 'nose' | 'mouth' | 'leftEar' | 'rightEar' | 'symmetryLine' | 'silhouette' | 'lipsUpperOuter' | 'lipsLowerOuter' | 'lipsUpperInner' | 'lipsLowerInner' | 'rightEyeUpper0' | 'rightEyeLower0' | 'rightEyeUpper1' | 'rightEyeLower1' | 'rightEyeUpper2' | 'rightEyeLower2' | 'rightEyeLower3' | 'rightEyebrowUpper' | 'rightEyebrowLower' | 'rightEyeIris' | 'leftEyeUpper0' | 'leftEyeLower0' | 'leftEyeUpper1' | 'leftEyeLower1' | 'leftEyeUpper2' | 'leftEyeLower2' | 'leftEyeLower3' | 'leftEyebrowUpper' | 'leftEyebrowLower' | 'leftEyeIris' | 'midwayBetweenEyes' | 'noseTip' | 'noseBottom' | 'noseRightCorner' | 'noseLeftCorner' | 'rightCheek' | 'leftCheek';
/** Liveness part of face configuration */ /** Liveness part of face configuration */
export declare interface FaceLivenessConfig extends GenericConfig { export declare interface FaceLivenessConfig extends GenericConfig {
} }
@ -549,22 +569,22 @@ export declare interface FaceResult {
/** detected face mesh normalized to 0..1 */ /** detected face mesh normalized to 0..1 */
meshRaw: Array<Point>; meshRaw: Array<Point>;
/** mesh keypoints combined into annotated results */ /** mesh keypoints combined into annotated results */
annotations: Record<string, Point[]>; annotations: Record<FaceLandmark, Point[]>;
/** detected age */ /** detected age */
age?: number; age?: number;
/** detected gender */ /** detected gender */
gender?: string; gender?: Gender;
/** gender detection score */ /** gender detection score */
genderScore?: number; genderScore?: number;
/** detected emotions */ /** detected emotions */
emotion?: Array<{ emotion?: Array<{
score: number; score: number;
emotion: string; emotion: Emotion;
}>; }>;
/** detected race */ /** detected race */
race?: Array<{ race?: Array<{
score: number; score: number;
race: string; race: Race;
}>; }>;
/** face descriptor */ /** face descriptor */
embedding?: Array<number>; embedding?: Array<number>;
@ -646,6 +666,12 @@ export declare interface FilterConfig {
pixelate: number; pixelate: number;
} }
export declare type Finger = 'index' | 'middle' | 'pinky' | 'ring' | 'thumb' | 'palm';
export declare type FingerCurl = 'none' | 'half' | 'full';
export declare type FingerDirection = 'verticalUp' | 'verticalDown' | 'horizontalLeft' | 'horizontalRight' | 'diagonalUpRight' | 'diagonalUpLeft' | 'diagonalDownRight' | 'diagonalDownLeft';
/** /**
* Creates an IOHandler that loads model artifacts from memory. * Creates an IOHandler that loads model artifacts from memory.
* *
@ -669,6 +695,8 @@ export declare interface FilterConfig {
*/ */
declare function fromMemory(modelArtifacts: {} | ModelArtifacts, weightSpecs?: WeightsManifestEntry[], weightData?: ArrayBuffer, trainingConfig?: TrainingConfig): IOHandler; declare function fromMemory(modelArtifacts: {} | ModelArtifacts, weightSpecs?: WeightsManifestEntry[], weightData?: ArrayBuffer, trainingConfig?: TrainingConfig): IOHandler;
export declare type Gender = 'male' | 'female' | 'unknown';
/** Generic config type inherited by all module types */ /** Generic config type inherited by all module types */
export declare interface GenericConfig { export declare interface GenericConfig {
/** is module enabled? */ /** is module enabled? */
@ -970,16 +998,18 @@ export declare interface HandResult {
/** detected hand keypoints */ /** detected hand keypoints */
keypoints: Array<Point>; keypoints: Array<Point>;
/** detected hand class */ /** detected hand class */
label: string; label: HandType;
/** detected hand keypoints combined into annotated parts */ /** detected hand keypoints combined into annotated parts */
annotations: Record<'index' | 'middle' | 'pinky' | 'ring' | 'thumb' | 'palm', Array<Point>>; annotations: Record<Finger, Array<Point>>;
/** detected hand parts annotated with part gestures */ /** detected hand parts annotated with part gestures */
landmarks: Record<'index' | 'middle' | 'pinky' | 'ring' | 'thumb', { landmarks: Record<Finger, {
curl: 'none' | 'half' | 'full'; curl: FingerCurl;
direction: 'verticalUp' | 'verticalDown' | 'horizontalLeft' | 'horizontalRight' | 'diagonalUpRight' | 'diagonalUpLeft' | 'diagonalDownRight' | 'diagonalDownLeft'; direction: FingerDirection;
}>; }>;
} }
export declare type HandType = 'hand' | 'fist' | 'pinch' | 'point' | 'face' | 'tip' | 'pinchtip';
/** /**
* Creates an IOHandler subtype that sends model artifacts to HTTP server. * Creates an IOHandler subtype that sends model artifacts to HTTP server.
* *
@ -1865,13 +1895,15 @@ export declare interface ObjectResult {
/** detected object class id */ /** detected object class id */
class: number; class: number;
/** detected object class name */ /** detected object class name */
label: string; label: ObjectType;
/** detected object box */ /** detected object box */
box: Box; box: Box;
/** detected object box normalized to 0..1 */ /** detected object box normalized to 0..1 */
boxRaw: Box; boxRaw: Box;
} }
export declare type ObjectType = 'person' | 'bicycle' | 'car' | 'motorcycle' | 'airplane' | 'bus' | 'train' | 'truck' | 'boat' | 'traffic light' | 'fire hydrant' | 'stop sign' | 'parking meter' | 'bench' | 'bird' | 'cat' | 'dog' | 'horse' | 'sheep' | 'cow' | 'elephant' | 'bear' | 'zebra' | 'giraffe' | 'backpack' | 'umbrella' | 'handbag' | 'tie' | 'suitcase' | 'frisbee' | 'skis' | 'snowboard' | 'sports ball' | 'kite' | 'baseball bat' | 'baseball glove' | 'skateboard' | 'surfboard' | 'tennis racket' | 'bottle' | 'wine glass' | 'cup' | 'fork' | 'knife' | 'spoon' | 'bowl' | 'banana' | 'apple' | 'sandwich' | 'orange' | 'broccoli' | 'carrot' | 'hot dog' | 'pizza' | 'donut' | 'cake' | 'chair' | 'couch' | 'potted plant' | 'bed' | 'dining table' | 'toilet' | 'tv' | 'laptop' | 'mouse' | 'remote' | 'keyboard' | 'cell phone' | 'microwave' | 'oven' | 'toaster' | 'sink' | 'refrigerator' | 'book' | 'clock' | 'vase' | 'scissors' | 'teddy bear' | 'hair drier' | 'toothbrush';
/** /**
* Callback for the progress of a long-running action such as an HTTP * Callback for the progress of a long-running action such as an HTTP
* request for a large binary object. * request for a large binary object.
@ -1913,6 +1945,8 @@ export declare interface PersonResult {
/** generic point as [x, y, z?] */ /** generic point as [x, y, z?] */
export declare type Point = [number, number, number?]; export declare type Point = [number, number, number?];
export declare type Race = 'white' | 'black' | 'asian' | 'indian' | 'other';
export declare enum Rank { export declare enum Rank {
R0 = "R0", R0 = "R0",
R1 = "R1", R1 = "R1",

View File

@ -29,6 +29,12 @@ export declare type BackendType = ['cpu', 'wasm', 'webgl', 'humangl', 'tensorflo
/** draw detected bodies */ /** draw detected bodies */
declare function body(inCanvas: AnyCanvas, result: Array<BodyResult>, drawOptions?: Partial<DrawOptions>): Promise<void>; declare function body(inCanvas: AnyCanvas, result: Array<BodyResult>, drawOptions?: Partial<DrawOptions>): Promise<void>;
export declare type BodyAnnotation = BodyAnnotationBlazePose | BodyAnnotationEfficientPose;
export declare type BodyAnnotationBlazePose = 'leftLeg' | 'rightLeg' | 'torso' | 'leftArm' | 'rightArm' | 'leftEye' | 'rightEye' | 'mouth';
export declare type BodyAnnotationEfficientPose = 'leftLeg' | 'rightLeg' | 'torso' | 'leftArm' | 'rightArm' | 'head';
/** Configures all body detection specific options */ /** Configures all body detection specific options */
export declare interface BodyConfig extends GenericConfig { export declare interface BodyConfig extends GenericConfig {
/** maximum numboer of detected bodies */ /** maximum numboer of detected bodies */
@ -43,7 +49,7 @@ export declare type BodyGesture = `leaning ${'left' | 'right'}` | `raise ${'left
/** Body Result keypoints */ /** Body Result keypoints */
export declare interface BodyKeypoint { export declare interface BodyKeypoint {
/** body part name */ /** body part name */
part: string; part: BodyLandmark;
/** body part position */ /** body part position */
position: Point; position: Point;
/** body part position normalized to 0..1 */ /** body part position normalized to 0..1 */
@ -52,6 +58,16 @@ export declare interface BodyKeypoint {
score: number; score: number;
} }
export declare type BodyLandmark = BodyLandmarkPoseNet | BodyLandmarkMoveNet | BodyLandmarkEfficientNet | BodyLandmarkBlazePose;
export declare type BodyLandmarkBlazePose = 'nose' | 'leftEyeInside' | 'leftEye' | 'leftEyeOutside' | 'rightEyeInside' | 'rightEye' | 'rightEyeOutside' | 'leftEar' | 'rightEar' | 'leftMouth' | 'rightMouth' | 'leftShoulder' | 'rightShoulder' | 'leftElbow' | 'rightElbow' | 'leftWrist' | 'rightWrist' | 'leftPinky' | 'rightPinky' | 'leftIndex' | 'rightIndex' | 'leftThumb' | 'rightThumb' | 'leftHip' | 'rightHip' | 'leftKnee' | 'rightKnee' | 'leftAnkle' | 'rightAnkle' | 'leftHeel' | 'rightHeel' | 'leftFoot' | 'rightFoot' | 'bodyCenter' | 'bodyTop' | 'leftPalm' | 'leftHand' | 'rightPalm' | 'rightHand';
export declare type BodyLandmarkEfficientNet = 'head' | 'neck' | 'rightShoulder' | 'rightElbow' | 'rightWrist' | 'chest' | 'leftShoulder' | 'leftElbow' | 'leftWrist' | 'bodyCenter' | 'rightHip' | 'rightKnee' | 'rightAnkle' | 'leftHip' | 'leftKnee' | 'leftAnkle';
export declare type BodyLandmarkMoveNet = 'nose' | 'leftEye' | 'rightEye' | 'leftEar' | 'rightEar' | 'leftShoulder' | 'rightShoulder' | 'leftElbow' | 'rightElbow' | 'leftWrist' | 'rightWrist' | 'leftHip' | 'rightHip' | 'leftKnee' | 'rightKnee' | 'leftAnkle' | 'rightAnkle';
export declare type BodyLandmarkPoseNet = 'nose' | 'leftEye' | 'rightEye' | 'leftEar' | 'rightEar' | 'leftShoulder' | 'rightShoulder' | 'leftElbow' | 'rightElbow' | 'leftWrist' | 'rightWrist' | 'leftHip' | 'rightHip' | 'leftKnee' | 'rightKnee' | 'leftAnkle' | 'rightAnkle';
/** Body results */ /** Body results */
export declare interface BodyResult { export declare interface BodyResult {
/** body id */ /** body id */
@ -65,7 +81,7 @@ export declare interface BodyResult {
/** detected body keypoints */ /** detected body keypoints */
keypoints: Array<BodyKeypoint>; keypoints: Array<BodyKeypoint>;
/** detected body keypoints combined into annotated parts */ /** detected body keypoints combined into annotated parts */
annotations: Record<string, Array<Point[]>>; annotations: Record<BodyAnnotation, Point[][]>;
} }
/** generic box as [x, y, width, height] */ /** generic box as [x, y, width, height] */
@ -356,6 +372,8 @@ export declare type DrawOptions = {
useCurves: boolean; useCurves: boolean;
}; };
export declare type Emotion = 'angry' | 'disgust' | 'fear' | 'happy' | 'sad' | 'surprise' | 'neutral';
/** /**
* Encode a map from names to weight values as an ArrayBuffer, along with an * Encode a map from names to weight values as an ArrayBuffer, along with an
* `Array` of `WeightsManifestEntry` as specification of the encoded weights. * `Array` of `WeightsManifestEntry` as specification of the encoded weights.
@ -519,6 +537,8 @@ export declare type FaceGesture = `facing ${'left' | 'center' | 'right'}` | `bli
export declare interface FaceIrisConfig extends GenericConfig { export declare interface FaceIrisConfig extends GenericConfig {
} }
export declare type FaceLandmark = 'leftEye' | 'rightEye' | 'nose' | 'mouth' | 'leftEar' | 'rightEar' | 'symmetryLine' | 'silhouette' | 'lipsUpperOuter' | 'lipsLowerOuter' | 'lipsUpperInner' | 'lipsLowerInner' | 'rightEyeUpper0' | 'rightEyeLower0' | 'rightEyeUpper1' | 'rightEyeLower1' | 'rightEyeUpper2' | 'rightEyeLower2' | 'rightEyeLower3' | 'rightEyebrowUpper' | 'rightEyebrowLower' | 'rightEyeIris' | 'leftEyeUpper0' | 'leftEyeLower0' | 'leftEyeUpper1' | 'leftEyeLower1' | 'leftEyeUpper2' | 'leftEyeLower2' | 'leftEyeLower3' | 'leftEyebrowUpper' | 'leftEyebrowLower' | 'leftEyeIris' | 'midwayBetweenEyes' | 'noseTip' | 'noseBottom' | 'noseRightCorner' | 'noseLeftCorner' | 'rightCheek' | 'leftCheek';
/** Liveness part of face configuration */ /** Liveness part of face configuration */
export declare interface FaceLivenessConfig extends GenericConfig { export declare interface FaceLivenessConfig extends GenericConfig {
} }
@ -549,22 +569,22 @@ export declare interface FaceResult {
/** detected face mesh normalized to 0..1 */ /** detected face mesh normalized to 0..1 */
meshRaw: Array<Point>; meshRaw: Array<Point>;
/** mesh keypoints combined into annotated results */ /** mesh keypoints combined into annotated results */
annotations: Record<string, Point[]>; annotations: Record<FaceLandmark, Point[]>;
/** detected age */ /** detected age */
age?: number; age?: number;
/** detected gender */ /** detected gender */
gender?: string; gender?: Gender;
/** gender detection score */ /** gender detection score */
genderScore?: number; genderScore?: number;
/** detected emotions */ /** detected emotions */
emotion?: Array<{ emotion?: Array<{
score: number; score: number;
emotion: string; emotion: Emotion;
}>; }>;
/** detected race */ /** detected race */
race?: Array<{ race?: Array<{
score: number; score: number;
race: string; race: Race;
}>; }>;
/** face descriptor */ /** face descriptor */
embedding?: Array<number>; embedding?: Array<number>;
@ -646,6 +666,12 @@ export declare interface FilterConfig {
pixelate: number; pixelate: number;
} }
export declare type Finger = 'index' | 'middle' | 'pinky' | 'ring' | 'thumb' | 'palm';
export declare type FingerCurl = 'none' | 'half' | 'full';
export declare type FingerDirection = 'verticalUp' | 'verticalDown' | 'horizontalLeft' | 'horizontalRight' | 'diagonalUpRight' | 'diagonalUpLeft' | 'diagonalDownRight' | 'diagonalDownLeft';
/** /**
* Creates an IOHandler that loads model artifacts from memory. * Creates an IOHandler that loads model artifacts from memory.
* *
@ -669,6 +695,8 @@ export declare interface FilterConfig {
*/ */
declare function fromMemory(modelArtifacts: {} | ModelArtifacts, weightSpecs?: WeightsManifestEntry[], weightData?: ArrayBuffer, trainingConfig?: TrainingConfig): IOHandler; declare function fromMemory(modelArtifacts: {} | ModelArtifacts, weightSpecs?: WeightsManifestEntry[], weightData?: ArrayBuffer, trainingConfig?: TrainingConfig): IOHandler;
export declare type Gender = 'male' | 'female' | 'unknown';
/** Generic config type inherited by all module types */ /** Generic config type inherited by all module types */
export declare interface GenericConfig { export declare interface GenericConfig {
/** is module enabled? */ /** is module enabled? */
@ -970,16 +998,18 @@ export declare interface HandResult {
/** detected hand keypoints */ /** detected hand keypoints */
keypoints: Array<Point>; keypoints: Array<Point>;
/** detected hand class */ /** detected hand class */
label: string; label: HandType;
/** detected hand keypoints combined into annotated parts */ /** detected hand keypoints combined into annotated parts */
annotations: Record<'index' | 'middle' | 'pinky' | 'ring' | 'thumb' | 'palm', Array<Point>>; annotations: Record<Finger, Array<Point>>;
/** detected hand parts annotated with part gestures */ /** detected hand parts annotated with part gestures */
landmarks: Record<'index' | 'middle' | 'pinky' | 'ring' | 'thumb', { landmarks: Record<Finger, {
curl: 'none' | 'half' | 'full'; curl: FingerCurl;
direction: 'verticalUp' | 'verticalDown' | 'horizontalLeft' | 'horizontalRight' | 'diagonalUpRight' | 'diagonalUpLeft' | 'diagonalDownRight' | 'diagonalDownLeft'; direction: FingerDirection;
}>; }>;
} }
export declare type HandType = 'hand' | 'fist' | 'pinch' | 'point' | 'face' | 'tip' | 'pinchtip';
/** /**
* Creates an IOHandler subtype that sends model artifacts to HTTP server. * Creates an IOHandler subtype that sends model artifacts to HTTP server.
* *
@ -1865,13 +1895,15 @@ export declare interface ObjectResult {
/** detected object class id */ /** detected object class id */
class: number; class: number;
/** detected object class name */ /** detected object class name */
label: string; label: ObjectType;
/** detected object box */ /** detected object box */
box: Box; box: Box;
/** detected object box normalized to 0..1 */ /** detected object box normalized to 0..1 */
boxRaw: Box; boxRaw: Box;
} }
export declare type ObjectType = 'person' | 'bicycle' | 'car' | 'motorcycle' | 'airplane' | 'bus' | 'train' | 'truck' | 'boat' | 'traffic light' | 'fire hydrant' | 'stop sign' | 'parking meter' | 'bench' | 'bird' | 'cat' | 'dog' | 'horse' | 'sheep' | 'cow' | 'elephant' | 'bear' | 'zebra' | 'giraffe' | 'backpack' | 'umbrella' | 'handbag' | 'tie' | 'suitcase' | 'frisbee' | 'skis' | 'snowboard' | 'sports ball' | 'kite' | 'baseball bat' | 'baseball glove' | 'skateboard' | 'surfboard' | 'tennis racket' | 'bottle' | 'wine glass' | 'cup' | 'fork' | 'knife' | 'spoon' | 'bowl' | 'banana' | 'apple' | 'sandwich' | 'orange' | 'broccoli' | 'carrot' | 'hot dog' | 'pizza' | 'donut' | 'cake' | 'chair' | 'couch' | 'potted plant' | 'bed' | 'dining table' | 'toilet' | 'tv' | 'laptop' | 'mouse' | 'remote' | 'keyboard' | 'cell phone' | 'microwave' | 'oven' | 'toaster' | 'sink' | 'refrigerator' | 'book' | 'clock' | 'vase' | 'scissors' | 'teddy bear' | 'hair drier' | 'toothbrush';
/** /**
* Callback for the progress of a long-running action such as an HTTP * Callback for the progress of a long-running action such as an HTTP
* request for a large binary object. * request for a large binary object.
@ -1913,6 +1945,8 @@ export declare interface PersonResult {
/** generic point as [x, y, z?] */ /** generic point as [x, y, z?] */
export declare type Point = [number, number, number?]; export declare type Point = [number, number, number?];
export declare type Race = 'white' | 'black' | 'asian' | 'indian' | 'other';
export declare enum Rank { export declare enum Rank {
R0 = "R0", R0 = "R0",
R1 = "R1", R1 = "R1",

View File

@ -1534,7 +1534,7 @@ async function predict3(image29, config3, idx, count2) {
const normalize = tfjs_esm_exports.mul(tfjs_esm_exports.sub(grayscale, constants.tf05), 2); const normalize = tfjs_esm_exports.mul(tfjs_esm_exports.sub(grayscale, constants.tf05), 2);
return normalize; return normalize;
}); });
const obj = { gender: "", genderScore: 0 }; const obj = { gender: "unknown", genderScore: 0 };
if (config3.face["ssrnet"].enabled) if (config3.face["ssrnet"].enabled)
t.gender = model3.execute(t.enhance); t.gender = model3.execute(t.enhance);
const data = await t.gender.data(); const data = await t.gender.data();
@ -10637,7 +10637,8 @@ function scalePoses(poses, [height, width], [inputResolutionHeight, inputResolut
part, part,
position: [Math.trunc(position.x * scaleX), Math.trunc(position.y * scaleY)], position: [Math.trunc(position.x * scaleX), Math.trunc(position.y * scaleY)],
positionRaw: [position.x / inputResolutionHeight, position.y / inputResolutionHeight] positionRaw: [position.x / inputResolutionHeight, position.y / inputResolutionHeight]
})) })),
annotations: {}
}); });
const scaledPoses = poses.map((pose, i) => scalePose(pose, i)); const scaledPoses = poses.map((pose, i) => scalePose(pose, i));
return scaledPoses; return scaledPoses;
@ -11969,7 +11970,7 @@ var calculateFaceAngle = (face5, imageSize) => {
// src/face/face.ts // src/face/face.ts
var detectFace = async (instance, input) => { var detectFace = async (instance, input) => {
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z; var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v;
let timeStamp; let timeStamp;
let ageRes; let ageRes;
let gearRes; let gearRes;
@ -12082,12 +12083,10 @@ var detectFace = async (instance, input) => {
descRes = { age: gearRes.age, gender: gearRes.gender, genderScore: gearRes.genderScore, race: gearRes.race }; descRes = { age: gearRes.age, gender: gearRes.gender, genderScore: gearRes.genderScore, race: gearRes.race };
if (((_t = instance.config.face["mobilefacenet"]) == null ? void 0 : _t.enabled) && mobilefacenetRes) if (((_t = instance.config.face["mobilefacenet"]) == null ? void 0 : _t.enabled) && mobilefacenetRes)
descRes.descriptor = mobilefacenetRes; descRes.descriptor = mobilefacenetRes;
if (!((_u = instance.config.face.iris) == null ? void 0 : _u.enabled) && ((_w = (_v = faces[i]) == null ? void 0 : _v.annotations) == null ? void 0 : _w.leftEyeIris) && ((_y = (_x = faces[i]) == null ? void 0 : _x.annotations) == null ? void 0 : _y.rightEyeIris)) { if (!((_u = instance.config.face.iris) == null ? void 0 : _u.enabled)) {
delete faces[i].annotations.leftEyeIris;
delete faces[i].annotations.rightEyeIris;
} }
const irisSize = faces[i].annotations && faces[i].annotations.leftEyeIris && faces[i].annotations.leftEyeIris[0] && faces[i].annotations.rightEyeIris && faces[i].annotations.rightEyeIris[0] && faces[i].annotations.leftEyeIris.length > 0 && faces[i].annotations.rightEyeIris.length > 0 && faces[i].annotations.leftEyeIris[0] !== null && faces[i].annotations.rightEyeIris[0] !== null ? Math.max(Math.abs(faces[i].annotations.leftEyeIris[3][0] - faces[i].annotations.leftEyeIris[1][0]), Math.abs(faces[i].annotations.rightEyeIris[4][1] - faces[i].annotations.rightEyeIris[2][1])) / input.shape[2] : 0; const irisSize = faces[i].annotations && faces[i].annotations.leftEyeIris && faces[i].annotations.leftEyeIris[0] && faces[i].annotations.rightEyeIris && faces[i].annotations.rightEyeIris[0] && faces[i].annotations.leftEyeIris.length > 0 && faces[i].annotations.rightEyeIris.length > 0 && faces[i].annotations.leftEyeIris[0] !== null && faces[i].annotations.rightEyeIris[0] !== null ? Math.max(Math.abs(faces[i].annotations.leftEyeIris[3][0] - faces[i].annotations.leftEyeIris[1][0]), Math.abs(faces[i].annotations.rightEyeIris[4][1] - faces[i].annotations.rightEyeIris[2][1])) / input.shape[2] : 0;
const tensor3 = ((_z = instance.config.face.detector) == null ? void 0 : _z.return) ? tfjs_esm_exports.squeeze(faces[i].tensor) : null; const tensor3 = ((_v = instance.config.face.detector) == null ? void 0 : _v.return) ? tfjs_esm_exports.squeeze(faces[i].tensor) : null;
tfjs_esm_exports.dispose(faces[i].tensor); tfjs_esm_exports.dispose(faces[i].tensor);
if (faces[i].tensor) if (faces[i].tensor)
delete faces[i].tensor; delete faces[i].tensor;

File diff suppressed because one or more lines are too long

58
dist/human.esm.d.ts vendored
View File

@ -29,6 +29,12 @@ export declare type BackendType = ['cpu', 'wasm', 'webgl', 'humangl', 'tensorflo
/** draw detected bodies */ /** draw detected bodies */
declare function body(inCanvas: AnyCanvas, result: Array<BodyResult>, drawOptions?: Partial<DrawOptions>): Promise<void>; declare function body(inCanvas: AnyCanvas, result: Array<BodyResult>, drawOptions?: Partial<DrawOptions>): Promise<void>;
export declare type BodyAnnotation = BodyAnnotationBlazePose | BodyAnnotationEfficientPose;
export declare type BodyAnnotationBlazePose = 'leftLeg' | 'rightLeg' | 'torso' | 'leftArm' | 'rightArm' | 'leftEye' | 'rightEye' | 'mouth';
export declare type BodyAnnotationEfficientPose = 'leftLeg' | 'rightLeg' | 'torso' | 'leftArm' | 'rightArm' | 'head';
/** Configures all body detection specific options */ /** Configures all body detection specific options */
export declare interface BodyConfig extends GenericConfig { export declare interface BodyConfig extends GenericConfig {
/** maximum numboer of detected bodies */ /** maximum numboer of detected bodies */
@ -43,7 +49,7 @@ export declare type BodyGesture = `leaning ${'left' | 'right'}` | `raise ${'left
/** Body Result keypoints */ /** Body Result keypoints */
export declare interface BodyKeypoint { export declare interface BodyKeypoint {
/** body part name */ /** body part name */
part: string; part: BodyLandmark;
/** body part position */ /** body part position */
position: Point; position: Point;
/** body part position normalized to 0..1 */ /** body part position normalized to 0..1 */
@ -52,6 +58,16 @@ export declare interface BodyKeypoint {
score: number; score: number;
} }
export declare type BodyLandmark = BodyLandmarkPoseNet | BodyLandmarkMoveNet | BodyLandmarkEfficientNet | BodyLandmarkBlazePose;
export declare type BodyLandmarkBlazePose = 'nose' | 'leftEyeInside' | 'leftEye' | 'leftEyeOutside' | 'rightEyeInside' | 'rightEye' | 'rightEyeOutside' | 'leftEar' | 'rightEar' | 'leftMouth' | 'rightMouth' | 'leftShoulder' | 'rightShoulder' | 'leftElbow' | 'rightElbow' | 'leftWrist' | 'rightWrist' | 'leftPinky' | 'rightPinky' | 'leftIndex' | 'rightIndex' | 'leftThumb' | 'rightThumb' | 'leftHip' | 'rightHip' | 'leftKnee' | 'rightKnee' | 'leftAnkle' | 'rightAnkle' | 'leftHeel' | 'rightHeel' | 'leftFoot' | 'rightFoot' | 'bodyCenter' | 'bodyTop' | 'leftPalm' | 'leftHand' | 'rightPalm' | 'rightHand';
export declare type BodyLandmarkEfficientNet = 'head' | 'neck' | 'rightShoulder' | 'rightElbow' | 'rightWrist' | 'chest' | 'leftShoulder' | 'leftElbow' | 'leftWrist' | 'bodyCenter' | 'rightHip' | 'rightKnee' | 'rightAnkle' | 'leftHip' | 'leftKnee' | 'leftAnkle';
export declare type BodyLandmarkMoveNet = 'nose' | 'leftEye' | 'rightEye' | 'leftEar' | 'rightEar' | 'leftShoulder' | 'rightShoulder' | 'leftElbow' | 'rightElbow' | 'leftWrist' | 'rightWrist' | 'leftHip' | 'rightHip' | 'leftKnee' | 'rightKnee' | 'leftAnkle' | 'rightAnkle';
export declare type BodyLandmarkPoseNet = 'nose' | 'leftEye' | 'rightEye' | 'leftEar' | 'rightEar' | 'leftShoulder' | 'rightShoulder' | 'leftElbow' | 'rightElbow' | 'leftWrist' | 'rightWrist' | 'leftHip' | 'rightHip' | 'leftKnee' | 'rightKnee' | 'leftAnkle' | 'rightAnkle';
/** Body results */ /** Body results */
export declare interface BodyResult { export declare interface BodyResult {
/** body id */ /** body id */
@ -65,7 +81,7 @@ export declare interface BodyResult {
/** detected body keypoints */ /** detected body keypoints */
keypoints: Array<BodyKeypoint>; keypoints: Array<BodyKeypoint>;
/** detected body keypoints combined into annotated parts */ /** detected body keypoints combined into annotated parts */
annotations: Record<string, Array<Point[]>>; annotations: Record<BodyAnnotation, Point[][]>;
} }
/** generic box as [x, y, width, height] */ /** generic box as [x, y, width, height] */
@ -356,6 +372,8 @@ export declare type DrawOptions = {
useCurves: boolean; useCurves: boolean;
}; };
export declare type Emotion = 'angry' | 'disgust' | 'fear' | 'happy' | 'sad' | 'surprise' | 'neutral';
/** /**
* Encode a map from names to weight values as an ArrayBuffer, along with an * Encode a map from names to weight values as an ArrayBuffer, along with an
* `Array` of `WeightsManifestEntry` as specification of the encoded weights. * `Array` of `WeightsManifestEntry` as specification of the encoded weights.
@ -519,6 +537,8 @@ export declare type FaceGesture = `facing ${'left' | 'center' | 'right'}` | `bli
export declare interface FaceIrisConfig extends GenericConfig { export declare interface FaceIrisConfig extends GenericConfig {
} }
export declare type FaceLandmark = 'leftEye' | 'rightEye' | 'nose' | 'mouth' | 'leftEar' | 'rightEar' | 'symmetryLine' | 'silhouette' | 'lipsUpperOuter' | 'lipsLowerOuter' | 'lipsUpperInner' | 'lipsLowerInner' | 'rightEyeUpper0' | 'rightEyeLower0' | 'rightEyeUpper1' | 'rightEyeLower1' | 'rightEyeUpper2' | 'rightEyeLower2' | 'rightEyeLower3' | 'rightEyebrowUpper' | 'rightEyebrowLower' | 'rightEyeIris' | 'leftEyeUpper0' | 'leftEyeLower0' | 'leftEyeUpper1' | 'leftEyeLower1' | 'leftEyeUpper2' | 'leftEyeLower2' | 'leftEyeLower3' | 'leftEyebrowUpper' | 'leftEyebrowLower' | 'leftEyeIris' | 'midwayBetweenEyes' | 'noseTip' | 'noseBottom' | 'noseRightCorner' | 'noseLeftCorner' | 'rightCheek' | 'leftCheek';
/** Liveness part of face configuration */ /** Liveness part of face configuration */
export declare interface FaceLivenessConfig extends GenericConfig { export declare interface FaceLivenessConfig extends GenericConfig {
} }
@ -549,22 +569,22 @@ export declare interface FaceResult {
/** detected face mesh normalized to 0..1 */ /** detected face mesh normalized to 0..1 */
meshRaw: Array<Point>; meshRaw: Array<Point>;
/** mesh keypoints combined into annotated results */ /** mesh keypoints combined into annotated results */
annotations: Record<string, Point[]>; annotations: Record<FaceLandmark, Point[]>;
/** detected age */ /** detected age */
age?: number; age?: number;
/** detected gender */ /** detected gender */
gender?: string; gender?: Gender;
/** gender detection score */ /** gender detection score */
genderScore?: number; genderScore?: number;
/** detected emotions */ /** detected emotions */
emotion?: Array<{ emotion?: Array<{
score: number; score: number;
emotion: string; emotion: Emotion;
}>; }>;
/** detected race */ /** detected race */
race?: Array<{ race?: Array<{
score: number; score: number;
race: string; race: Race;
}>; }>;
/** face descriptor */ /** face descriptor */
embedding?: Array<number>; embedding?: Array<number>;
@ -646,6 +666,12 @@ export declare interface FilterConfig {
pixelate: number; pixelate: number;
} }
export declare type Finger = 'index' | 'middle' | 'pinky' | 'ring' | 'thumb' | 'palm';
export declare type FingerCurl = 'none' | 'half' | 'full';
export declare type FingerDirection = 'verticalUp' | 'verticalDown' | 'horizontalLeft' | 'horizontalRight' | 'diagonalUpRight' | 'diagonalUpLeft' | 'diagonalDownRight' | 'diagonalDownLeft';
/** /**
* Creates an IOHandler that loads model artifacts from memory. * Creates an IOHandler that loads model artifacts from memory.
* *
@ -669,6 +695,8 @@ export declare interface FilterConfig {
*/ */
declare function fromMemory(modelArtifacts: {} | ModelArtifacts, weightSpecs?: WeightsManifestEntry[], weightData?: ArrayBuffer, trainingConfig?: TrainingConfig): IOHandler; declare function fromMemory(modelArtifacts: {} | ModelArtifacts, weightSpecs?: WeightsManifestEntry[], weightData?: ArrayBuffer, trainingConfig?: TrainingConfig): IOHandler;
export declare type Gender = 'male' | 'female' | 'unknown';
/** Generic config type inherited by all module types */ /** Generic config type inherited by all module types */
export declare interface GenericConfig { export declare interface GenericConfig {
/** is module enabled? */ /** is module enabled? */
@ -970,16 +998,18 @@ export declare interface HandResult {
/** detected hand keypoints */ /** detected hand keypoints */
keypoints: Array<Point>; keypoints: Array<Point>;
/** detected hand class */ /** detected hand class */
label: string; label: HandType;
/** detected hand keypoints combined into annotated parts */ /** detected hand keypoints combined into annotated parts */
annotations: Record<'index' | 'middle' | 'pinky' | 'ring' | 'thumb' | 'palm', Array<Point>>; annotations: Record<Finger, Array<Point>>;
/** detected hand parts annotated with part gestures */ /** detected hand parts annotated with part gestures */
landmarks: Record<'index' | 'middle' | 'pinky' | 'ring' | 'thumb', { landmarks: Record<Finger, {
curl: 'none' | 'half' | 'full'; curl: FingerCurl;
direction: 'verticalUp' | 'verticalDown' | 'horizontalLeft' | 'horizontalRight' | 'diagonalUpRight' | 'diagonalUpLeft' | 'diagonalDownRight' | 'diagonalDownLeft'; direction: FingerDirection;
}>; }>;
} }
export declare type HandType = 'hand' | 'fist' | 'pinch' | 'point' | 'face' | 'tip' | 'pinchtip';
/** /**
* Creates an IOHandler subtype that sends model artifacts to HTTP server. * Creates an IOHandler subtype that sends model artifacts to HTTP server.
* *
@ -1865,13 +1895,15 @@ export declare interface ObjectResult {
/** detected object class id */ /** detected object class id */
class: number; class: number;
/** detected object class name */ /** detected object class name */
label: string; label: ObjectType;
/** detected object box */ /** detected object box */
box: Box; box: Box;
/** detected object box normalized to 0..1 */ /** detected object box normalized to 0..1 */
boxRaw: Box; boxRaw: Box;
} }
export declare type ObjectType = 'person' | 'bicycle' | 'car' | 'motorcycle' | 'airplane' | 'bus' | 'train' | 'truck' | 'boat' | 'traffic light' | 'fire hydrant' | 'stop sign' | 'parking meter' | 'bench' | 'bird' | 'cat' | 'dog' | 'horse' | 'sheep' | 'cow' | 'elephant' | 'bear' | 'zebra' | 'giraffe' | 'backpack' | 'umbrella' | 'handbag' | 'tie' | 'suitcase' | 'frisbee' | 'skis' | 'snowboard' | 'sports ball' | 'kite' | 'baseball bat' | 'baseball glove' | 'skateboard' | 'surfboard' | 'tennis racket' | 'bottle' | 'wine glass' | 'cup' | 'fork' | 'knife' | 'spoon' | 'bowl' | 'banana' | 'apple' | 'sandwich' | 'orange' | 'broccoli' | 'carrot' | 'hot dog' | 'pizza' | 'donut' | 'cake' | 'chair' | 'couch' | 'potted plant' | 'bed' | 'dining table' | 'toilet' | 'tv' | 'laptop' | 'mouse' | 'remote' | 'keyboard' | 'cell phone' | 'microwave' | 'oven' | 'toaster' | 'sink' | 'refrigerator' | 'book' | 'clock' | 'vase' | 'scissors' | 'teddy bear' | 'hair drier' | 'toothbrush';
/** /**
* Callback for the progress of a long-running action such as an HTTP * Callback for the progress of a long-running action such as an HTTP
* request for a large binary object. * request for a large binary object.
@ -1913,6 +1945,8 @@ export declare interface PersonResult {
/** generic point as [x, y, z?] */ /** generic point as [x, y, z?] */
export declare type Point = [number, number, number?]; export declare type Point = [number, number, number?];
export declare type Race = 'white' | 'black' | 'asian' | 'indian' | 'other';
export declare enum Rank { export declare enum Rank {
R0 = "R0", R0 = "R0",
R1 = "R1", R1 = "R1",

74
dist/human.esm.js vendored
View File

@ -59740,25 +59740,21 @@ function getWorkGroupSizeString() {
[[stage(compute), workgroup_size(workGroupSizeX, workGroupSizeY, workGroupSizeZ)]] [[stage(compute), workgroup_size(workGroupSizeX, workGroupSizeY, workGroupSizeZ)]]
`; `;
} }
function getFlatDispatchLayoutMainHeaderString() { function getMainHeaderString() {
return ` return `
${getWorkGroupSizeString()} ${getWorkGroupSizeString()}
fn main([[builtin(local_invocation_id)]] localId : vec3<u32>, fn main([[builtin(local_invocation_id)]] LocalId : vec3<u32>,
[[builtin(global_invocation_id)]] globalId : vec3<u32>, [[builtin(global_invocation_id)]] GlobalId : vec3<u32>,
[[builtin(num_workgroups)]] numWorkgroups: vec3<u32>) [[builtin(num_workgroups)]] NumWorkgroups: vec3<u32>) {
`; localId = LocalId;
} globalId = GlobalId;
function getNonFlatDispatchLayoutMainHeaderString() { numWorkgroups = NumWorkgroups;
return `
${getWorkGroupSizeString()}
fn main([[builtin(local_invocation_id)]] localId : vec3<u32>,
[[builtin(global_invocation_id)]] globalId : vec3<u32>)
`; `;
} }
function getMainHeaderAndGlobalIndexString() { function getMainHeaderAndGlobalIndexString() {
return ` return `
${getFlatDispatchLayoutMainHeaderString()} { ${getMainHeaderString()}
let index = getGlobalIndex(globalId, localId, numWorkgroups); let index = getGlobalIndex();
`; `;
} }
function makeShader2(inputInfo, outputData, program, isFromPixel = false) { function makeShader2(inputInfo, outputData, program, isFromPixel = false) {
@ -59861,6 +59857,10 @@ function makeShader2(inputInfo, outputData, program, isFromPixel = false) {
return source; return source;
} }
var SHADER_PREFIX = ` var SHADER_PREFIX = `
var<private> localId: vec3<u32>;
var<private> globalId: vec3<u32>;
var<private> numWorkgroups: vec3<u32>;
fn idiv(a: i32, b: i32, sign: f32) -> i32 { fn idiv(a: i32, b: i32, sign: f32) -> i32 {
var res: i32 = a / b; var res: i32 = a / b;
let mod: i32 = a % b; let mod: i32 = a % b;
@ -59922,7 +59922,7 @@ var SAMPLING_SNIPPETS = `
} }
// Only used when the y/z dimension of workgroup size is 1. // Only used when the y/z dimension of workgroup size is 1.
fn getGlobalIndex(globalId : vec3<u32>, localId : vec3<u32>, numWorkgroups: vec3<u32>) -> i32 { fn getGlobalIndex() -> i32 {
if (numWorkgroups.y == 1u && numWorkgroups.z == 1u) { if (numWorkgroups.y == 1u && numWorkgroups.z == 1u) {
return i32(globalId.x); return i32(globalId.x);
} }
@ -60183,8 +60183,8 @@ function generateGetOutputCoords(outShape, dispatchLayout) {
const outRank = outShape.length; const outRank = outShape.length;
if (x.length === outRank) { if (x.length === outRank) {
const dtype2 = getCoordsDataType2(outRank); const dtype2 = getCoordsDataType2(outRank);
const snippet2 = `fn getOutputCoordsWithFlatDispatchLayout(globalId : vec3<u32>, localId : vec3<u32>, numWorkgroups: vec3<u32>) -> ${dtype2}{ const snippet2 = `fn getOutputCoords() -> ${dtype2}{
let globalIndex = getGlobalIndex(globalId, localId, numWorkgroups); let globalIndex = getGlobalIndex();
return getCoordsFromFlatIndex(globalIndex); return getCoordsFromFlatIndex(globalIndex);
} }
`; `;
@ -60219,7 +60219,7 @@ function generateGetOutputCoords(outShape, dispatchLayout) {
dimensions.push(`d${i}`); dimensions.push(`d${i}`);
} }
const dtype = getCoordsDataType2(rank); const dtype = getCoordsDataType2(rank);
let snippet = `fn getOutputCoordsWithNonFlatDispatchLayout(globalId : vec3<u32>) -> ${dtype} { let snippet = `fn getOutputCoords() -> ${dtype} {
${gatherDimensionsStr} ${gatherDimensionsStr}
`; `;
if (dimensions.length === 0) { if (dimensions.length === 0) {
@ -60740,7 +60740,7 @@ function makeMatMulPackedVec4Source(workPerThread, workGroupSize) {
let TileBOuter = ${tileInfo.TileBOuter}; let TileBOuter = ${tileInfo.TileBOuter};
let TileInner = ${tileInfo.TileInner}; let TileInner = ${tileInfo.TileInner};
${getNonFlatDispatchLayoutMainHeaderString()} { ${getMainHeaderString()}
let tileRow = i32(localId.y) * RowPerThread; let tileRow = i32(localId.y) * RowPerThread;
let tileCol = i32(localId.x); let tileCol = i32(localId.x);
@ -60799,13 +60799,13 @@ function makeMatMulPackedVec4Source(workPerThread, workGroupSize) {
globalCol, globalCol,
acc[innerRow], globalId); acc[innerRow], globalId);
} }
}`; }`;
} }
function makeMatMulVectorVec4Source(workGroupSize) { function makeMatMulVectorVec4Source(workGroupSize) {
return ` return `
var<workgroup> mm_Asub : array<vec4<f32>, ${workGroupSize[0]}>; var<workgroup> mm_Asub : array<vec4<f32>, ${workGroupSize[0]}>;
let tileSize = ${workGroupSize[0] * 4}; let tileSize = ${workGroupSize[0] * 4};
${getNonFlatDispatchLayoutMainHeaderString()} { ${getMainHeaderString()}
let tileCol = i32(localId.x); let tileCol = i32(localId.x);
let globalCol = i32(globalId.x); let globalCol = i32(globalId.x);
let globalRow = i32(globalId.y); let globalRow = i32(globalId.y);
@ -60955,7 +60955,7 @@ function makeMatMulPackedSource(workPerThread, workGroupSize) {
return ` return `
var<workgroup> mm_Asub : array<array<f32, ${tileInner}>, ${tileAOuter}>; var<workgroup> mm_Asub : array<array<f32, ${tileInner}>, ${tileAOuter}>;
var<workgroup> mm_Bsub : array<array<f32, ${tileBOuter}>, ${tileInner}>; var<workgroup> mm_Bsub : array<array<f32, ${tileBOuter}>, ${tileInner}>;
${getNonFlatDispatchLayoutMainHeaderString()} { ${getMainHeaderString()}
let tileRow = i32(localId.y) * ${workPerThread[1]}; let tileRow = i32(localId.y) * ${workPerThread[1]};
let tileCol = i32(localId.x) * ${workPerThread[0]}; let tileCol = i32(localId.x) * ${workPerThread[0]};
@ -61043,7 +61043,7 @@ function makeMatMulVectorSource(workGroupSize) {
let TileSize = ${workGroupSize[0] * 4}; let TileSize = ${workGroupSize[0] * 4};
var<workgroup> mm_Asub : array<vec4<f32>, ${workGroupSize[0]}>; var<workgroup> mm_Asub : array<vec4<f32>, ${workGroupSize[0]}>;
${getNonFlatDispatchLayoutMainHeaderString()} { ${getMainHeaderString()}
let tileCol = i32(localId.x); let tileCol = i32(localId.x);
let globalCol = i32(globalId.x); let globalCol = i32(globalId.x);
let globalRow = i32(globalId.y); let globalRow = i32(globalId.y);
@ -61210,8 +61210,8 @@ var MatMulPackedProgram2 = class {
function makeMatMulReduceSource() { function makeMatMulReduceSource() {
return ` return `
var<workgroup> sumValues : array<f32, workGroupSizeX>; var<workgroup> sumValues : array<f32, workGroupSizeX>;
${getNonFlatDispatchLayoutMainHeaderString()} { ${getMainHeaderString()}
let coords = getOutputCoordsWithNonFlatDispatchLayout(globalId); let coords = getOutputCoords();
let batch = coords[0]; let batch = coords[0];
let row = coords[1]; let row = coords[1];
let col = coords[2]; let col = coords[2];
@ -61336,7 +61336,7 @@ function makeMatMulSmallOutputSizeSource(workGroupSize) {
// arithmetic operations and others handle IO operations between barrier api, // arithmetic operations and others handle IO operations between barrier api,
// makes ALUs and load/store units work simultaneously, could improves // makes ALUs and load/store units work simultaneously, could improves
// the performance. // the performance.
${getNonFlatDispatchLayoutMainHeaderString()} { ${getMainHeaderString()}
let tileRow = i32(localId.y); let tileRow = i32(localId.y);
let tileCol = i32(localId.x); let tileCol = i32(localId.x);
let globalRow = i32(globalId.y); let globalRow = i32(globalId.y);
@ -63329,8 +63329,8 @@ var Conv2DNaiveProgram = class {
} }
} }
${getFlatDispatchLayoutMainHeaderString()} { ${getMainHeaderString()}
let coords = getOutputCoordsWithFlatDispatchLayout(globalId, localId, numWorkgroups); let coords = getOutputCoords();
let batch = coords[0]; let batch = coords[0];
let outChannel = coords[3]; let outChannel = coords[3];
@ -63958,9 +63958,8 @@ var DepthwiseConv2DProgram2 = class {
} }
} }
${getFlatDispatchLayoutMainHeaderString()} { ${getMainHeaderString()}
let coords = getOutputCoordsWithFlatDispatchLayout(globalId, let coords = getOutputCoords();
localId, numWorkgroups);
let batch = coords[0]; let batch = coords[0];
let xRCCorner = vec2<i32>(coords.yz) * uniforms.stride - uniforms.pad; let xRCCorner = vec2<i32>(coords.yz) * uniforms.stride - uniforms.pad;
let d2 = coords[3]; let d2 = coords[3];
@ -71009,7 +71008,7 @@ registerBackend("wasm", async () => {
const { wasm } = await init(); const { wasm } = await init();
return new BackendWasm(wasm); return new BackendWasm(wasm);
}, WASM_PRIORITY); }, WASM_PRIORITY);
var externalVersion = "3.12.0-20211214"; var externalVersion = "3.12.0-20211215";
var version8 = { var version8 = {
tfjs: externalVersion, tfjs: externalVersion,
"tfjs-core": externalVersion, "tfjs-core": externalVersion,
@ -72299,7 +72298,7 @@ async function predict3(image7, config3, idx, count3) {
const normalize = mul(sub(grayscale, constants.tf05), 2); const normalize = mul(sub(grayscale, constants.tf05), 2);
return normalize; return normalize;
}); });
const obj = { gender: "", genderScore: 0 }; const obj = { gender: "unknown", genderScore: 0 };
if (config3.face["ssrnet"].enabled) if (config3.face["ssrnet"].enabled)
t.gender = model4.execute(t.enhance); t.gender = model4.execute(t.enhance);
const data = await t.gender.data(); const data = await t.gender.data();
@ -81402,7 +81401,8 @@ function scalePoses(poses, [height, width], [inputResolutionHeight, inputResolut
part, part,
position: [Math.trunc(position.x * scaleX), Math.trunc(position.y * scaleY)], position: [Math.trunc(position.x * scaleX), Math.trunc(position.y * scaleY)],
positionRaw: [position.x / inputResolutionHeight, position.y / inputResolutionHeight] positionRaw: [position.x / inputResolutionHeight, position.y / inputResolutionHeight]
})) })),
annotations: {}
}); });
const scaledPoses = poses.map((pose, i) => scalePose(pose, i)); const scaledPoses = poses.map((pose, i) => scalePose(pose, i));
return scaledPoses; return scaledPoses;
@ -82734,7 +82734,7 @@ var calculateFaceAngle = (face5, imageSize) => {
// src/face/face.ts // src/face/face.ts
var detectFace = async (instance, input2) => { var detectFace = async (instance, input2) => {
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z; var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v;
let timeStamp; let timeStamp;
let ageRes; let ageRes;
let gearRes; let gearRes;
@ -82847,12 +82847,10 @@ var detectFace = async (instance, input2) => {
descRes = { age: gearRes.age, gender: gearRes.gender, genderScore: gearRes.genderScore, race: gearRes.race }; descRes = { age: gearRes.age, gender: gearRes.gender, genderScore: gearRes.genderScore, race: gearRes.race };
if (((_t = instance.config.face["mobilefacenet"]) == null ? void 0 : _t.enabled) && mobilefacenetRes) if (((_t = instance.config.face["mobilefacenet"]) == null ? void 0 : _t.enabled) && mobilefacenetRes)
descRes.descriptor = mobilefacenetRes; descRes.descriptor = mobilefacenetRes;
if (!((_u = instance.config.face.iris) == null ? void 0 : _u.enabled) && ((_w = (_v = faces[i]) == null ? void 0 : _v.annotations) == null ? void 0 : _w.leftEyeIris) && ((_y = (_x = faces[i]) == null ? void 0 : _x.annotations) == null ? void 0 : _y.rightEyeIris)) { if (!((_u = instance.config.face.iris) == null ? void 0 : _u.enabled)) {
delete faces[i].annotations.leftEyeIris;
delete faces[i].annotations.rightEyeIris;
} }
const irisSize = faces[i].annotations && faces[i].annotations.leftEyeIris && faces[i].annotations.leftEyeIris[0] && faces[i].annotations.rightEyeIris && faces[i].annotations.rightEyeIris[0] && faces[i].annotations.leftEyeIris.length > 0 && faces[i].annotations.rightEyeIris.length > 0 && faces[i].annotations.leftEyeIris[0] !== null && faces[i].annotations.rightEyeIris[0] !== null ? Math.max(Math.abs(faces[i].annotations.leftEyeIris[3][0] - faces[i].annotations.leftEyeIris[1][0]), Math.abs(faces[i].annotations.rightEyeIris[4][1] - faces[i].annotations.rightEyeIris[2][1])) / input2.shape[2] : 0; const irisSize = faces[i].annotations && faces[i].annotations.leftEyeIris && faces[i].annotations.leftEyeIris[0] && faces[i].annotations.rightEyeIris && faces[i].annotations.rightEyeIris[0] && faces[i].annotations.leftEyeIris.length > 0 && faces[i].annotations.rightEyeIris.length > 0 && faces[i].annotations.leftEyeIris[0] !== null && faces[i].annotations.rightEyeIris[0] !== null ? Math.max(Math.abs(faces[i].annotations.leftEyeIris[3][0] - faces[i].annotations.leftEyeIris[1][0]), Math.abs(faces[i].annotations.rightEyeIris[4][1] - faces[i].annotations.rightEyeIris[2][1])) / input2.shape[2] : 0;
const tensor2 = ((_z = instance.config.face.detector) == null ? void 0 : _z.return) ? squeeze(faces[i].tensor) : null; const tensor2 = ((_v = instance.config.face.detector) == null ? void 0 : _v.return) ? squeeze(faces[i].tensor) : null;
dispose(faces[i].tensor); dispose(faces[i].tensor);
if (faces[i].tensor) if (faces[i].tensor)
delete faces[i].tensor; delete faces[i].tensor;

File diff suppressed because one or more lines are too long

786
dist/human.js vendored

File diff suppressed because one or more lines are too long

View File

@ -29,6 +29,12 @@ export declare type BackendType = ['cpu', 'wasm', 'webgl', 'humangl', 'tensorflo
/** draw detected bodies */ /** draw detected bodies */
declare function body(inCanvas: AnyCanvas, result: Array<BodyResult>, drawOptions?: Partial<DrawOptions>): Promise<void>; declare function body(inCanvas: AnyCanvas, result: Array<BodyResult>, drawOptions?: Partial<DrawOptions>): Promise<void>;
export declare type BodyAnnotation = BodyAnnotationBlazePose | BodyAnnotationEfficientPose;
export declare type BodyAnnotationBlazePose = 'leftLeg' | 'rightLeg' | 'torso' | 'leftArm' | 'rightArm' | 'leftEye' | 'rightEye' | 'mouth';
export declare type BodyAnnotationEfficientPose = 'leftLeg' | 'rightLeg' | 'torso' | 'leftArm' | 'rightArm' | 'head';
/** Configures all body detection specific options */ /** Configures all body detection specific options */
export declare interface BodyConfig extends GenericConfig { export declare interface BodyConfig extends GenericConfig {
/** maximum numboer of detected bodies */ /** maximum numboer of detected bodies */
@ -43,7 +49,7 @@ export declare type BodyGesture = `leaning ${'left' | 'right'}` | `raise ${'left
/** Body Result keypoints */ /** Body Result keypoints */
export declare interface BodyKeypoint { export declare interface BodyKeypoint {
/** body part name */ /** body part name */
part: string; part: BodyLandmark;
/** body part position */ /** body part position */
position: Point; position: Point;
/** body part position normalized to 0..1 */ /** body part position normalized to 0..1 */
@ -52,6 +58,16 @@ export declare interface BodyKeypoint {
score: number; score: number;
} }
export declare type BodyLandmark = BodyLandmarkPoseNet | BodyLandmarkMoveNet | BodyLandmarkEfficientNet | BodyLandmarkBlazePose;
export declare type BodyLandmarkBlazePose = 'nose' | 'leftEyeInside' | 'leftEye' | 'leftEyeOutside' | 'rightEyeInside' | 'rightEye' | 'rightEyeOutside' | 'leftEar' | 'rightEar' | 'leftMouth' | 'rightMouth' | 'leftShoulder' | 'rightShoulder' | 'leftElbow' | 'rightElbow' | 'leftWrist' | 'rightWrist' | 'leftPinky' | 'rightPinky' | 'leftIndex' | 'rightIndex' | 'leftThumb' | 'rightThumb' | 'leftHip' | 'rightHip' | 'leftKnee' | 'rightKnee' | 'leftAnkle' | 'rightAnkle' | 'leftHeel' | 'rightHeel' | 'leftFoot' | 'rightFoot' | 'bodyCenter' | 'bodyTop' | 'leftPalm' | 'leftHand' | 'rightPalm' | 'rightHand';
export declare type BodyLandmarkEfficientNet = 'head' | 'neck' | 'rightShoulder' | 'rightElbow' | 'rightWrist' | 'chest' | 'leftShoulder' | 'leftElbow' | 'leftWrist' | 'bodyCenter' | 'rightHip' | 'rightKnee' | 'rightAnkle' | 'leftHip' | 'leftKnee' | 'leftAnkle';
export declare type BodyLandmarkMoveNet = 'nose' | 'leftEye' | 'rightEye' | 'leftEar' | 'rightEar' | 'leftShoulder' | 'rightShoulder' | 'leftElbow' | 'rightElbow' | 'leftWrist' | 'rightWrist' | 'leftHip' | 'rightHip' | 'leftKnee' | 'rightKnee' | 'leftAnkle' | 'rightAnkle';
export declare type BodyLandmarkPoseNet = 'nose' | 'leftEye' | 'rightEye' | 'leftEar' | 'rightEar' | 'leftShoulder' | 'rightShoulder' | 'leftElbow' | 'rightElbow' | 'leftWrist' | 'rightWrist' | 'leftHip' | 'rightHip' | 'leftKnee' | 'rightKnee' | 'leftAnkle' | 'rightAnkle';
/** Body results */ /** Body results */
export declare interface BodyResult { export declare interface BodyResult {
/** body id */ /** body id */
@ -65,7 +81,7 @@ export declare interface BodyResult {
/** detected body keypoints */ /** detected body keypoints */
keypoints: Array<BodyKeypoint>; keypoints: Array<BodyKeypoint>;
/** detected body keypoints combined into annotated parts */ /** detected body keypoints combined into annotated parts */
annotations: Record<string, Array<Point[]>>; annotations: Record<BodyAnnotation, Point[][]>;
} }
/** generic box as [x, y, width, height] */ /** generic box as [x, y, width, height] */
@ -356,6 +372,8 @@ export declare type DrawOptions = {
useCurves: boolean; useCurves: boolean;
}; };
export declare type Emotion = 'angry' | 'disgust' | 'fear' | 'happy' | 'sad' | 'surprise' | 'neutral';
/** /**
* Encode a map from names to weight values as an ArrayBuffer, along with an * Encode a map from names to weight values as an ArrayBuffer, along with an
* `Array` of `WeightsManifestEntry` as specification of the encoded weights. * `Array` of `WeightsManifestEntry` as specification of the encoded weights.
@ -519,6 +537,8 @@ export declare type FaceGesture = `facing ${'left' | 'center' | 'right'}` | `bli
export declare interface FaceIrisConfig extends GenericConfig { export declare interface FaceIrisConfig extends GenericConfig {
} }
export declare type FaceLandmark = 'leftEye' | 'rightEye' | 'nose' | 'mouth' | 'leftEar' | 'rightEar' | 'symmetryLine' | 'silhouette' | 'lipsUpperOuter' | 'lipsLowerOuter' | 'lipsUpperInner' | 'lipsLowerInner' | 'rightEyeUpper0' | 'rightEyeLower0' | 'rightEyeUpper1' | 'rightEyeLower1' | 'rightEyeUpper2' | 'rightEyeLower2' | 'rightEyeLower3' | 'rightEyebrowUpper' | 'rightEyebrowLower' | 'rightEyeIris' | 'leftEyeUpper0' | 'leftEyeLower0' | 'leftEyeUpper1' | 'leftEyeLower1' | 'leftEyeUpper2' | 'leftEyeLower2' | 'leftEyeLower3' | 'leftEyebrowUpper' | 'leftEyebrowLower' | 'leftEyeIris' | 'midwayBetweenEyes' | 'noseTip' | 'noseBottom' | 'noseRightCorner' | 'noseLeftCorner' | 'rightCheek' | 'leftCheek';
/** Liveness part of face configuration */ /** Liveness part of face configuration */
export declare interface FaceLivenessConfig extends GenericConfig { export declare interface FaceLivenessConfig extends GenericConfig {
} }
@ -549,22 +569,22 @@ export declare interface FaceResult {
/** detected face mesh normalized to 0..1 */ /** detected face mesh normalized to 0..1 */
meshRaw: Array<Point>; meshRaw: Array<Point>;
/** mesh keypoints combined into annotated results */ /** mesh keypoints combined into annotated results */
annotations: Record<string, Point[]>; annotations: Record<FaceLandmark, Point[]>;
/** detected age */ /** detected age */
age?: number; age?: number;
/** detected gender */ /** detected gender */
gender?: string; gender?: Gender;
/** gender detection score */ /** gender detection score */
genderScore?: number; genderScore?: number;
/** detected emotions */ /** detected emotions */
emotion?: Array<{ emotion?: Array<{
score: number; score: number;
emotion: string; emotion: Emotion;
}>; }>;
/** detected race */ /** detected race */
race?: Array<{ race?: Array<{
score: number; score: number;
race: string; race: Race;
}>; }>;
/** face descriptor */ /** face descriptor */
embedding?: Array<number>; embedding?: Array<number>;
@ -646,6 +666,12 @@ export declare interface FilterConfig {
pixelate: number; pixelate: number;
} }
export declare type Finger = 'index' | 'middle' | 'pinky' | 'ring' | 'thumb' | 'palm';
export declare type FingerCurl = 'none' | 'half' | 'full';
export declare type FingerDirection = 'verticalUp' | 'verticalDown' | 'horizontalLeft' | 'horizontalRight' | 'diagonalUpRight' | 'diagonalUpLeft' | 'diagonalDownRight' | 'diagonalDownLeft';
/** /**
* Creates an IOHandler that loads model artifacts from memory. * Creates an IOHandler that loads model artifacts from memory.
* *
@ -669,6 +695,8 @@ export declare interface FilterConfig {
*/ */
declare function fromMemory(modelArtifacts: {} | ModelArtifacts, weightSpecs?: WeightsManifestEntry[], weightData?: ArrayBuffer, trainingConfig?: TrainingConfig): IOHandler; declare function fromMemory(modelArtifacts: {} | ModelArtifacts, weightSpecs?: WeightsManifestEntry[], weightData?: ArrayBuffer, trainingConfig?: TrainingConfig): IOHandler;
export declare type Gender = 'male' | 'female' | 'unknown';
/** Generic config type inherited by all module types */ /** Generic config type inherited by all module types */
export declare interface GenericConfig { export declare interface GenericConfig {
/** is module enabled? */ /** is module enabled? */
@ -970,16 +998,18 @@ export declare interface HandResult {
/** detected hand keypoints */ /** detected hand keypoints */
keypoints: Array<Point>; keypoints: Array<Point>;
/** detected hand class */ /** detected hand class */
label: string; label: HandType;
/** detected hand keypoints combined into annotated parts */ /** detected hand keypoints combined into annotated parts */
annotations: Record<'index' | 'middle' | 'pinky' | 'ring' | 'thumb' | 'palm', Array<Point>>; annotations: Record<Finger, Array<Point>>;
/** detected hand parts annotated with part gestures */ /** detected hand parts annotated with part gestures */
landmarks: Record<'index' | 'middle' | 'pinky' | 'ring' | 'thumb', { landmarks: Record<Finger, {
curl: 'none' | 'half' | 'full'; curl: FingerCurl;
direction: 'verticalUp' | 'verticalDown' | 'horizontalLeft' | 'horizontalRight' | 'diagonalUpRight' | 'diagonalUpLeft' | 'diagonalDownRight' | 'diagonalDownLeft'; direction: FingerDirection;
}>; }>;
} }
export declare type HandType = 'hand' | 'fist' | 'pinch' | 'point' | 'face' | 'tip' | 'pinchtip';
/** /**
* Creates an IOHandler subtype that sends model artifacts to HTTP server. * Creates an IOHandler subtype that sends model artifacts to HTTP server.
* *
@ -1865,13 +1895,15 @@ export declare interface ObjectResult {
/** detected object class id */ /** detected object class id */
class: number; class: number;
/** detected object class name */ /** detected object class name */
label: string; label: ObjectType;
/** detected object box */ /** detected object box */
box: Box; box: Box;
/** detected object box normalized to 0..1 */ /** detected object box normalized to 0..1 */
boxRaw: Box; boxRaw: Box;
} }
export declare type ObjectType = 'person' | 'bicycle' | 'car' | 'motorcycle' | 'airplane' | 'bus' | 'train' | 'truck' | 'boat' | 'traffic light' | 'fire hydrant' | 'stop sign' | 'parking meter' | 'bench' | 'bird' | 'cat' | 'dog' | 'horse' | 'sheep' | 'cow' | 'elephant' | 'bear' | 'zebra' | 'giraffe' | 'backpack' | 'umbrella' | 'handbag' | 'tie' | 'suitcase' | 'frisbee' | 'skis' | 'snowboard' | 'sports ball' | 'kite' | 'baseball bat' | 'baseball glove' | 'skateboard' | 'surfboard' | 'tennis racket' | 'bottle' | 'wine glass' | 'cup' | 'fork' | 'knife' | 'spoon' | 'bowl' | 'banana' | 'apple' | 'sandwich' | 'orange' | 'broccoli' | 'carrot' | 'hot dog' | 'pizza' | 'donut' | 'cake' | 'chair' | 'couch' | 'potted plant' | 'bed' | 'dining table' | 'toilet' | 'tv' | 'laptop' | 'mouse' | 'remote' | 'keyboard' | 'cell phone' | 'microwave' | 'oven' | 'toaster' | 'sink' | 'refrigerator' | 'book' | 'clock' | 'vase' | 'scissors' | 'teddy bear' | 'hair drier' | 'toothbrush';
/** /**
* Callback for the progress of a long-running action such as an HTTP * Callback for the progress of a long-running action such as an HTTP
* request for a large binary object. * request for a large binary object.
@ -1913,6 +1945,8 @@ export declare interface PersonResult {
/** generic point as [x, y, z?] */ /** generic point as [x, y, z?] */
export declare type Point = [number, number, number?]; export declare type Point = [number, number, number?];
export declare type Race = 'white' | 'black' | 'asian' | 'indian' | 'other';
export declare enum Rank { export declare enum Rank {
R0 = "R0", R0 = "R0",
R1 = "R1", R1 = "R1",

View File

@ -1563,7 +1563,7 @@ async function predict3(image29, config3, idx, count2) {
const normalize = tf7.mul(tf7.sub(grayscale, constants.tf05), 2); const normalize = tf7.mul(tf7.sub(grayscale, constants.tf05), 2);
return normalize; return normalize;
}); });
const obj = { gender: "", genderScore: 0 }; const obj = { gender: "unknown", genderScore: 0 };
if (config3.face["ssrnet"].enabled) if (config3.face["ssrnet"].enabled)
t.gender = model3.execute(t.enhance); t.gender = model3.execute(t.enhance);
const data = await t.gender.data(); const data = await t.gender.data();
@ -10708,7 +10708,8 @@ function scalePoses(poses, [height, width], [inputResolutionHeight, inputResolut
part, part,
position: [Math.trunc(position.x * scaleX), Math.trunc(position.y * scaleY)], position: [Math.trunc(position.x * scaleX), Math.trunc(position.y * scaleY)],
positionRaw: [position.x / inputResolutionHeight, position.y / inputResolutionHeight] positionRaw: [position.x / inputResolutionHeight, position.y / inputResolutionHeight]
})) })),
annotations: {}
}); });
const scaledPoses = poses.map((pose, i) => scalePose(pose, i)); const scaledPoses = poses.map((pose, i) => scalePose(pose, i));
return scaledPoses; return scaledPoses;
@ -12046,7 +12047,7 @@ var calculateFaceAngle = (face5, imageSize) => {
// src/face/face.ts // src/face/face.ts
var detectFace = async (instance, input) => { var detectFace = async (instance, input) => {
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z; var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v;
let timeStamp; let timeStamp;
let ageRes; let ageRes;
let gearRes; let gearRes;
@ -12159,12 +12160,10 @@ var detectFace = async (instance, input) => {
descRes = { age: gearRes.age, gender: gearRes.gender, genderScore: gearRes.genderScore, race: gearRes.race }; descRes = { age: gearRes.age, gender: gearRes.gender, genderScore: gearRes.genderScore, race: gearRes.race };
if (((_t = instance.config.face["mobilefacenet"]) == null ? void 0 : _t.enabled) && mobilefacenetRes) if (((_t = instance.config.face["mobilefacenet"]) == null ? void 0 : _t.enabled) && mobilefacenetRes)
descRes.descriptor = mobilefacenetRes; descRes.descriptor = mobilefacenetRes;
if (!((_u = instance.config.face.iris) == null ? void 0 : _u.enabled) && ((_w = (_v = faces[i]) == null ? void 0 : _v.annotations) == null ? void 0 : _w.leftEyeIris) && ((_y = (_x = faces[i]) == null ? void 0 : _x.annotations) == null ? void 0 : _y.rightEyeIris)) { if (!((_u = instance.config.face.iris) == null ? void 0 : _u.enabled)) {
delete faces[i].annotations.leftEyeIris;
delete faces[i].annotations.rightEyeIris;
} }
const irisSize = faces[i].annotations && faces[i].annotations.leftEyeIris && faces[i].annotations.leftEyeIris[0] && faces[i].annotations.rightEyeIris && faces[i].annotations.rightEyeIris[0] && faces[i].annotations.leftEyeIris.length > 0 && faces[i].annotations.rightEyeIris.length > 0 && faces[i].annotations.leftEyeIris[0] !== null && faces[i].annotations.rightEyeIris[0] !== null ? Math.max(Math.abs(faces[i].annotations.leftEyeIris[3][0] - faces[i].annotations.leftEyeIris[1][0]), Math.abs(faces[i].annotations.rightEyeIris[4][1] - faces[i].annotations.rightEyeIris[2][1])) / input.shape[2] : 0; const irisSize = faces[i].annotations && faces[i].annotations.leftEyeIris && faces[i].annotations.leftEyeIris[0] && faces[i].annotations.rightEyeIris && faces[i].annotations.rightEyeIris[0] && faces[i].annotations.leftEyeIris.length > 0 && faces[i].annotations.rightEyeIris.length > 0 && faces[i].annotations.leftEyeIris[0] !== null && faces[i].annotations.rightEyeIris[0] !== null ? Math.max(Math.abs(faces[i].annotations.leftEyeIris[3][0] - faces[i].annotations.leftEyeIris[1][0]), Math.abs(faces[i].annotations.rightEyeIris[4][1] - faces[i].annotations.rightEyeIris[2][1])) / input.shape[2] : 0;
const tensor3 = ((_z = instance.config.face.detector) == null ? void 0 : _z.return) ? tf34.squeeze(faces[i].tensor) : null; const tensor3 = ((_v = instance.config.face.detector) == null ? void 0 : _v.return) ? tf34.squeeze(faces[i].tensor) : null;
tf34.dispose(faces[i].tensor); tf34.dispose(faces[i].tensor);
if (faces[i].tensor) if (faces[i].tensor)
delete faces[i].tensor; delete faces[i].tensor;

View File

@ -29,6 +29,12 @@ export declare type BackendType = ['cpu', 'wasm', 'webgl', 'humangl', 'tensorflo
/** draw detected bodies */ /** draw detected bodies */
declare function body(inCanvas: AnyCanvas, result: Array<BodyResult>, drawOptions?: Partial<DrawOptions>): Promise<void>; declare function body(inCanvas: AnyCanvas, result: Array<BodyResult>, drawOptions?: Partial<DrawOptions>): Promise<void>;
export declare type BodyAnnotation = BodyAnnotationBlazePose | BodyAnnotationEfficientPose;
export declare type BodyAnnotationBlazePose = 'leftLeg' | 'rightLeg' | 'torso' | 'leftArm' | 'rightArm' | 'leftEye' | 'rightEye' | 'mouth';
export declare type BodyAnnotationEfficientPose = 'leftLeg' | 'rightLeg' | 'torso' | 'leftArm' | 'rightArm' | 'head';
/** Configures all body detection specific options */ /** Configures all body detection specific options */
export declare interface BodyConfig extends GenericConfig { export declare interface BodyConfig extends GenericConfig {
/** maximum numboer of detected bodies */ /** maximum numboer of detected bodies */
@ -43,7 +49,7 @@ export declare type BodyGesture = `leaning ${'left' | 'right'}` | `raise ${'left
/** Body Result keypoints */ /** Body Result keypoints */
export declare interface BodyKeypoint { export declare interface BodyKeypoint {
/** body part name */ /** body part name */
part: string; part: BodyLandmark;
/** body part position */ /** body part position */
position: Point; position: Point;
/** body part position normalized to 0..1 */ /** body part position normalized to 0..1 */
@ -52,6 +58,16 @@ export declare interface BodyKeypoint {
score: number; score: number;
} }
export declare type BodyLandmark = BodyLandmarkPoseNet | BodyLandmarkMoveNet | BodyLandmarkEfficientNet | BodyLandmarkBlazePose;
export declare type BodyLandmarkBlazePose = 'nose' | 'leftEyeInside' | 'leftEye' | 'leftEyeOutside' | 'rightEyeInside' | 'rightEye' | 'rightEyeOutside' | 'leftEar' | 'rightEar' | 'leftMouth' | 'rightMouth' | 'leftShoulder' | 'rightShoulder' | 'leftElbow' | 'rightElbow' | 'leftWrist' | 'rightWrist' | 'leftPinky' | 'rightPinky' | 'leftIndex' | 'rightIndex' | 'leftThumb' | 'rightThumb' | 'leftHip' | 'rightHip' | 'leftKnee' | 'rightKnee' | 'leftAnkle' | 'rightAnkle' | 'leftHeel' | 'rightHeel' | 'leftFoot' | 'rightFoot' | 'bodyCenter' | 'bodyTop' | 'leftPalm' | 'leftHand' | 'rightPalm' | 'rightHand';
export declare type BodyLandmarkEfficientNet = 'head' | 'neck' | 'rightShoulder' | 'rightElbow' | 'rightWrist' | 'chest' | 'leftShoulder' | 'leftElbow' | 'leftWrist' | 'bodyCenter' | 'rightHip' | 'rightKnee' | 'rightAnkle' | 'leftHip' | 'leftKnee' | 'leftAnkle';
export declare type BodyLandmarkMoveNet = 'nose' | 'leftEye' | 'rightEye' | 'leftEar' | 'rightEar' | 'leftShoulder' | 'rightShoulder' | 'leftElbow' | 'rightElbow' | 'leftWrist' | 'rightWrist' | 'leftHip' | 'rightHip' | 'leftKnee' | 'rightKnee' | 'leftAnkle' | 'rightAnkle';
export declare type BodyLandmarkPoseNet = 'nose' | 'leftEye' | 'rightEye' | 'leftEar' | 'rightEar' | 'leftShoulder' | 'rightShoulder' | 'leftElbow' | 'rightElbow' | 'leftWrist' | 'rightWrist' | 'leftHip' | 'rightHip' | 'leftKnee' | 'rightKnee' | 'leftAnkle' | 'rightAnkle';
/** Body results */ /** Body results */
export declare interface BodyResult { export declare interface BodyResult {
/** body id */ /** body id */
@ -65,7 +81,7 @@ export declare interface BodyResult {
/** detected body keypoints */ /** detected body keypoints */
keypoints: Array<BodyKeypoint>; keypoints: Array<BodyKeypoint>;
/** detected body keypoints combined into annotated parts */ /** detected body keypoints combined into annotated parts */
annotations: Record<string, Array<Point[]>>; annotations: Record<BodyAnnotation, Point[][]>;
} }
/** generic box as [x, y, width, height] */ /** generic box as [x, y, width, height] */
@ -356,6 +372,8 @@ export declare type DrawOptions = {
useCurves: boolean; useCurves: boolean;
}; };
export declare type Emotion = 'angry' | 'disgust' | 'fear' | 'happy' | 'sad' | 'surprise' | 'neutral';
/** /**
* Encode a map from names to weight values as an ArrayBuffer, along with an * Encode a map from names to weight values as an ArrayBuffer, along with an
* `Array` of `WeightsManifestEntry` as specification of the encoded weights. * `Array` of `WeightsManifestEntry` as specification of the encoded weights.
@ -519,6 +537,8 @@ export declare type FaceGesture = `facing ${'left' | 'center' | 'right'}` | `bli
export declare interface FaceIrisConfig extends GenericConfig { export declare interface FaceIrisConfig extends GenericConfig {
} }
export declare type FaceLandmark = 'leftEye' | 'rightEye' | 'nose' | 'mouth' | 'leftEar' | 'rightEar' | 'symmetryLine' | 'silhouette' | 'lipsUpperOuter' | 'lipsLowerOuter' | 'lipsUpperInner' | 'lipsLowerInner' | 'rightEyeUpper0' | 'rightEyeLower0' | 'rightEyeUpper1' | 'rightEyeLower1' | 'rightEyeUpper2' | 'rightEyeLower2' | 'rightEyeLower3' | 'rightEyebrowUpper' | 'rightEyebrowLower' | 'rightEyeIris' | 'leftEyeUpper0' | 'leftEyeLower0' | 'leftEyeUpper1' | 'leftEyeLower1' | 'leftEyeUpper2' | 'leftEyeLower2' | 'leftEyeLower3' | 'leftEyebrowUpper' | 'leftEyebrowLower' | 'leftEyeIris' | 'midwayBetweenEyes' | 'noseTip' | 'noseBottom' | 'noseRightCorner' | 'noseLeftCorner' | 'rightCheek' | 'leftCheek';
/** Liveness part of face configuration */ /** Liveness part of face configuration */
export declare interface FaceLivenessConfig extends GenericConfig { export declare interface FaceLivenessConfig extends GenericConfig {
} }
@ -549,22 +569,22 @@ export declare interface FaceResult {
/** detected face mesh normalized to 0..1 */ /** detected face mesh normalized to 0..1 */
meshRaw: Array<Point>; meshRaw: Array<Point>;
/** mesh keypoints combined into annotated results */ /** mesh keypoints combined into annotated results */
annotations: Record<string, Point[]>; annotations: Record<FaceLandmark, Point[]>;
/** detected age */ /** detected age */
age?: number; age?: number;
/** detected gender */ /** detected gender */
gender?: string; gender?: Gender;
/** gender detection score */ /** gender detection score */
genderScore?: number; genderScore?: number;
/** detected emotions */ /** detected emotions */
emotion?: Array<{ emotion?: Array<{
score: number; score: number;
emotion: string; emotion: Emotion;
}>; }>;
/** detected race */ /** detected race */
race?: Array<{ race?: Array<{
score: number; score: number;
race: string; race: Race;
}>; }>;
/** face descriptor */ /** face descriptor */
embedding?: Array<number>; embedding?: Array<number>;
@ -646,6 +666,12 @@ export declare interface FilterConfig {
pixelate: number; pixelate: number;
} }
export declare type Finger = 'index' | 'middle' | 'pinky' | 'ring' | 'thumb' | 'palm';
export declare type FingerCurl = 'none' | 'half' | 'full';
export declare type FingerDirection = 'verticalUp' | 'verticalDown' | 'horizontalLeft' | 'horizontalRight' | 'diagonalUpRight' | 'diagonalUpLeft' | 'diagonalDownRight' | 'diagonalDownLeft';
/** /**
* Creates an IOHandler that loads model artifacts from memory. * Creates an IOHandler that loads model artifacts from memory.
* *
@ -669,6 +695,8 @@ export declare interface FilterConfig {
*/ */
declare function fromMemory(modelArtifacts: {} | ModelArtifacts, weightSpecs?: WeightsManifestEntry[], weightData?: ArrayBuffer, trainingConfig?: TrainingConfig): IOHandler; declare function fromMemory(modelArtifacts: {} | ModelArtifacts, weightSpecs?: WeightsManifestEntry[], weightData?: ArrayBuffer, trainingConfig?: TrainingConfig): IOHandler;
export declare type Gender = 'male' | 'female' | 'unknown';
/** Generic config type inherited by all module types */ /** Generic config type inherited by all module types */
export declare interface GenericConfig { export declare interface GenericConfig {
/** is module enabled? */ /** is module enabled? */
@ -970,16 +998,18 @@ export declare interface HandResult {
/** detected hand keypoints */ /** detected hand keypoints */
keypoints: Array<Point>; keypoints: Array<Point>;
/** detected hand class */ /** detected hand class */
label: string; label: HandType;
/** detected hand keypoints combined into annotated parts */ /** detected hand keypoints combined into annotated parts */
annotations: Record<'index' | 'middle' | 'pinky' | 'ring' | 'thumb' | 'palm', Array<Point>>; annotations: Record<Finger, Array<Point>>;
/** detected hand parts annotated with part gestures */ /** detected hand parts annotated with part gestures */
landmarks: Record<'index' | 'middle' | 'pinky' | 'ring' | 'thumb', { landmarks: Record<Finger, {
curl: 'none' | 'half' | 'full'; curl: FingerCurl;
direction: 'verticalUp' | 'verticalDown' | 'horizontalLeft' | 'horizontalRight' | 'diagonalUpRight' | 'diagonalUpLeft' | 'diagonalDownRight' | 'diagonalDownLeft'; direction: FingerDirection;
}>; }>;
} }
export declare type HandType = 'hand' | 'fist' | 'pinch' | 'point' | 'face' | 'tip' | 'pinchtip';
/** /**
* Creates an IOHandler subtype that sends model artifacts to HTTP server. * Creates an IOHandler subtype that sends model artifacts to HTTP server.
* *
@ -1865,13 +1895,15 @@ export declare interface ObjectResult {
/** detected object class id */ /** detected object class id */
class: number; class: number;
/** detected object class name */ /** detected object class name */
label: string; label: ObjectType;
/** detected object box */ /** detected object box */
box: Box; box: Box;
/** detected object box normalized to 0..1 */ /** detected object box normalized to 0..1 */
boxRaw: Box; boxRaw: Box;
} }
export declare type ObjectType = 'person' | 'bicycle' | 'car' | 'motorcycle' | 'airplane' | 'bus' | 'train' | 'truck' | 'boat' | 'traffic light' | 'fire hydrant' | 'stop sign' | 'parking meter' | 'bench' | 'bird' | 'cat' | 'dog' | 'horse' | 'sheep' | 'cow' | 'elephant' | 'bear' | 'zebra' | 'giraffe' | 'backpack' | 'umbrella' | 'handbag' | 'tie' | 'suitcase' | 'frisbee' | 'skis' | 'snowboard' | 'sports ball' | 'kite' | 'baseball bat' | 'baseball glove' | 'skateboard' | 'surfboard' | 'tennis racket' | 'bottle' | 'wine glass' | 'cup' | 'fork' | 'knife' | 'spoon' | 'bowl' | 'banana' | 'apple' | 'sandwich' | 'orange' | 'broccoli' | 'carrot' | 'hot dog' | 'pizza' | 'donut' | 'cake' | 'chair' | 'couch' | 'potted plant' | 'bed' | 'dining table' | 'toilet' | 'tv' | 'laptop' | 'mouse' | 'remote' | 'keyboard' | 'cell phone' | 'microwave' | 'oven' | 'toaster' | 'sink' | 'refrigerator' | 'book' | 'clock' | 'vase' | 'scissors' | 'teddy bear' | 'hair drier' | 'toothbrush';
/** /**
* Callback for the progress of a long-running action such as an HTTP * Callback for the progress of a long-running action such as an HTTP
* request for a large binary object. * request for a large binary object.
@ -1913,6 +1945,8 @@ export declare interface PersonResult {
/** generic point as [x, y, z?] */ /** generic point as [x, y, z?] */
export declare type Point = [number, number, number?]; export declare type Point = [number, number, number?];
export declare type Race = 'white' | 'black' | 'asian' | 'indian' | 'other';
export declare enum Rank { export declare enum Rank {
R0 = "R0", R0 = "R0",
R1 = "R1", R1 = "R1",

View File

@ -1564,7 +1564,7 @@ async function predict3(image29, config3, idx, count2) {
const normalize = tf7.mul(tf7.sub(grayscale, constants.tf05), 2); const normalize = tf7.mul(tf7.sub(grayscale, constants.tf05), 2);
return normalize; return normalize;
}); });
const obj = { gender: "", genderScore: 0 }; const obj = { gender: "unknown", genderScore: 0 };
if (config3.face["ssrnet"].enabled) if (config3.face["ssrnet"].enabled)
t.gender = model3.execute(t.enhance); t.gender = model3.execute(t.enhance);
const data = await t.gender.data(); const data = await t.gender.data();
@ -10709,7 +10709,8 @@ function scalePoses(poses, [height, width], [inputResolutionHeight, inputResolut
part, part,
position: [Math.trunc(position.x * scaleX), Math.trunc(position.y * scaleY)], position: [Math.trunc(position.x * scaleX), Math.trunc(position.y * scaleY)],
positionRaw: [position.x / inputResolutionHeight, position.y / inputResolutionHeight] positionRaw: [position.x / inputResolutionHeight, position.y / inputResolutionHeight]
})) })),
annotations: {}
}); });
const scaledPoses = poses.map((pose, i) => scalePose(pose, i)); const scaledPoses = poses.map((pose, i) => scalePose(pose, i));
return scaledPoses; return scaledPoses;
@ -12047,7 +12048,7 @@ var calculateFaceAngle = (face5, imageSize) => {
// src/face/face.ts // src/face/face.ts
var detectFace = async (instance, input) => { var detectFace = async (instance, input) => {
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z; var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v;
let timeStamp; let timeStamp;
let ageRes; let ageRes;
let gearRes; let gearRes;
@ -12160,12 +12161,10 @@ var detectFace = async (instance, input) => {
descRes = { age: gearRes.age, gender: gearRes.gender, genderScore: gearRes.genderScore, race: gearRes.race }; descRes = { age: gearRes.age, gender: gearRes.gender, genderScore: gearRes.genderScore, race: gearRes.race };
if (((_t = instance.config.face["mobilefacenet"]) == null ? void 0 : _t.enabled) && mobilefacenetRes) if (((_t = instance.config.face["mobilefacenet"]) == null ? void 0 : _t.enabled) && mobilefacenetRes)
descRes.descriptor = mobilefacenetRes; descRes.descriptor = mobilefacenetRes;
if (!((_u = instance.config.face.iris) == null ? void 0 : _u.enabled) && ((_w = (_v = faces[i]) == null ? void 0 : _v.annotations) == null ? void 0 : _w.leftEyeIris) && ((_y = (_x = faces[i]) == null ? void 0 : _x.annotations) == null ? void 0 : _y.rightEyeIris)) { if (!((_u = instance.config.face.iris) == null ? void 0 : _u.enabled)) {
delete faces[i].annotations.leftEyeIris;
delete faces[i].annotations.rightEyeIris;
} }
const irisSize = faces[i].annotations && faces[i].annotations.leftEyeIris && faces[i].annotations.leftEyeIris[0] && faces[i].annotations.rightEyeIris && faces[i].annotations.rightEyeIris[0] && faces[i].annotations.leftEyeIris.length > 0 && faces[i].annotations.rightEyeIris.length > 0 && faces[i].annotations.leftEyeIris[0] !== null && faces[i].annotations.rightEyeIris[0] !== null ? Math.max(Math.abs(faces[i].annotations.leftEyeIris[3][0] - faces[i].annotations.leftEyeIris[1][0]), Math.abs(faces[i].annotations.rightEyeIris[4][1] - faces[i].annotations.rightEyeIris[2][1])) / input.shape[2] : 0; const irisSize = faces[i].annotations && faces[i].annotations.leftEyeIris && faces[i].annotations.leftEyeIris[0] && faces[i].annotations.rightEyeIris && faces[i].annotations.rightEyeIris[0] && faces[i].annotations.leftEyeIris.length > 0 && faces[i].annotations.rightEyeIris.length > 0 && faces[i].annotations.leftEyeIris[0] !== null && faces[i].annotations.rightEyeIris[0] !== null ? Math.max(Math.abs(faces[i].annotations.leftEyeIris[3][0] - faces[i].annotations.leftEyeIris[1][0]), Math.abs(faces[i].annotations.rightEyeIris[4][1] - faces[i].annotations.rightEyeIris[2][1])) / input.shape[2] : 0;
const tensor3 = ((_z = instance.config.face.detector) == null ? void 0 : _z.return) ? tf34.squeeze(faces[i].tensor) : null; const tensor3 = ((_v = instance.config.face.detector) == null ? void 0 : _v.return) ? tf34.squeeze(faces[i].tensor) : null;
tf34.dispose(faces[i].tensor); tf34.dispose(faces[i].tensor);
if (faces[i].tensor) if (faces[i].tensor)
delete faces[i].tensor; delete faces[i].tensor;

58
dist/human.node.d.ts vendored
View File

@ -29,6 +29,12 @@ export declare type BackendType = ['cpu', 'wasm', 'webgl', 'humangl', 'tensorflo
/** draw detected bodies */ /** draw detected bodies */
declare function body(inCanvas: AnyCanvas, result: Array<BodyResult>, drawOptions?: Partial<DrawOptions>): Promise<void>; declare function body(inCanvas: AnyCanvas, result: Array<BodyResult>, drawOptions?: Partial<DrawOptions>): Promise<void>;
export declare type BodyAnnotation = BodyAnnotationBlazePose | BodyAnnotationEfficientPose;
export declare type BodyAnnotationBlazePose = 'leftLeg' | 'rightLeg' | 'torso' | 'leftArm' | 'rightArm' | 'leftEye' | 'rightEye' | 'mouth';
export declare type BodyAnnotationEfficientPose = 'leftLeg' | 'rightLeg' | 'torso' | 'leftArm' | 'rightArm' | 'head';
/** Configures all body detection specific options */ /** Configures all body detection specific options */
export declare interface BodyConfig extends GenericConfig { export declare interface BodyConfig extends GenericConfig {
/** maximum numboer of detected bodies */ /** maximum numboer of detected bodies */
@ -43,7 +49,7 @@ export declare type BodyGesture = `leaning ${'left' | 'right'}` | `raise ${'left
/** Body Result keypoints */ /** Body Result keypoints */
export declare interface BodyKeypoint { export declare interface BodyKeypoint {
/** body part name */ /** body part name */
part: string; part: BodyLandmark;
/** body part position */ /** body part position */
position: Point; position: Point;
/** body part position normalized to 0..1 */ /** body part position normalized to 0..1 */
@ -52,6 +58,16 @@ export declare interface BodyKeypoint {
score: number; score: number;
} }
export declare type BodyLandmark = BodyLandmarkPoseNet | BodyLandmarkMoveNet | BodyLandmarkEfficientNet | BodyLandmarkBlazePose;
export declare type BodyLandmarkBlazePose = 'nose' | 'leftEyeInside' | 'leftEye' | 'leftEyeOutside' | 'rightEyeInside' | 'rightEye' | 'rightEyeOutside' | 'leftEar' | 'rightEar' | 'leftMouth' | 'rightMouth' | 'leftShoulder' | 'rightShoulder' | 'leftElbow' | 'rightElbow' | 'leftWrist' | 'rightWrist' | 'leftPinky' | 'rightPinky' | 'leftIndex' | 'rightIndex' | 'leftThumb' | 'rightThumb' | 'leftHip' | 'rightHip' | 'leftKnee' | 'rightKnee' | 'leftAnkle' | 'rightAnkle' | 'leftHeel' | 'rightHeel' | 'leftFoot' | 'rightFoot' | 'bodyCenter' | 'bodyTop' | 'leftPalm' | 'leftHand' | 'rightPalm' | 'rightHand';
export declare type BodyLandmarkEfficientNet = 'head' | 'neck' | 'rightShoulder' | 'rightElbow' | 'rightWrist' | 'chest' | 'leftShoulder' | 'leftElbow' | 'leftWrist' | 'bodyCenter' | 'rightHip' | 'rightKnee' | 'rightAnkle' | 'leftHip' | 'leftKnee' | 'leftAnkle';
export declare type BodyLandmarkMoveNet = 'nose' | 'leftEye' | 'rightEye' | 'leftEar' | 'rightEar' | 'leftShoulder' | 'rightShoulder' | 'leftElbow' | 'rightElbow' | 'leftWrist' | 'rightWrist' | 'leftHip' | 'rightHip' | 'leftKnee' | 'rightKnee' | 'leftAnkle' | 'rightAnkle';
export declare type BodyLandmarkPoseNet = 'nose' | 'leftEye' | 'rightEye' | 'leftEar' | 'rightEar' | 'leftShoulder' | 'rightShoulder' | 'leftElbow' | 'rightElbow' | 'leftWrist' | 'rightWrist' | 'leftHip' | 'rightHip' | 'leftKnee' | 'rightKnee' | 'leftAnkle' | 'rightAnkle';
/** Body results */ /** Body results */
export declare interface BodyResult { export declare interface BodyResult {
/** body id */ /** body id */
@ -65,7 +81,7 @@ export declare interface BodyResult {
/** detected body keypoints */ /** detected body keypoints */
keypoints: Array<BodyKeypoint>; keypoints: Array<BodyKeypoint>;
/** detected body keypoints combined into annotated parts */ /** detected body keypoints combined into annotated parts */
annotations: Record<string, Array<Point[]>>; annotations: Record<BodyAnnotation, Point[][]>;
} }
/** generic box as [x, y, width, height] */ /** generic box as [x, y, width, height] */
@ -356,6 +372,8 @@ export declare type DrawOptions = {
useCurves: boolean; useCurves: boolean;
}; };
export declare type Emotion = 'angry' | 'disgust' | 'fear' | 'happy' | 'sad' | 'surprise' | 'neutral';
/** /**
* Encode a map from names to weight values as an ArrayBuffer, along with an * Encode a map from names to weight values as an ArrayBuffer, along with an
* `Array` of `WeightsManifestEntry` as specification of the encoded weights. * `Array` of `WeightsManifestEntry` as specification of the encoded weights.
@ -519,6 +537,8 @@ export declare type FaceGesture = `facing ${'left' | 'center' | 'right'}` | `bli
export declare interface FaceIrisConfig extends GenericConfig { export declare interface FaceIrisConfig extends GenericConfig {
} }
export declare type FaceLandmark = 'leftEye' | 'rightEye' | 'nose' | 'mouth' | 'leftEar' | 'rightEar' | 'symmetryLine' | 'silhouette' | 'lipsUpperOuter' | 'lipsLowerOuter' | 'lipsUpperInner' | 'lipsLowerInner' | 'rightEyeUpper0' | 'rightEyeLower0' | 'rightEyeUpper1' | 'rightEyeLower1' | 'rightEyeUpper2' | 'rightEyeLower2' | 'rightEyeLower3' | 'rightEyebrowUpper' | 'rightEyebrowLower' | 'rightEyeIris' | 'leftEyeUpper0' | 'leftEyeLower0' | 'leftEyeUpper1' | 'leftEyeLower1' | 'leftEyeUpper2' | 'leftEyeLower2' | 'leftEyeLower3' | 'leftEyebrowUpper' | 'leftEyebrowLower' | 'leftEyeIris' | 'midwayBetweenEyes' | 'noseTip' | 'noseBottom' | 'noseRightCorner' | 'noseLeftCorner' | 'rightCheek' | 'leftCheek';
/** Liveness part of face configuration */ /** Liveness part of face configuration */
export declare interface FaceLivenessConfig extends GenericConfig { export declare interface FaceLivenessConfig extends GenericConfig {
} }
@ -549,22 +569,22 @@ export declare interface FaceResult {
/** detected face mesh normalized to 0..1 */ /** detected face mesh normalized to 0..1 */
meshRaw: Array<Point>; meshRaw: Array<Point>;
/** mesh keypoints combined into annotated results */ /** mesh keypoints combined into annotated results */
annotations: Record<string, Point[]>; annotations: Record<FaceLandmark, Point[]>;
/** detected age */ /** detected age */
age?: number; age?: number;
/** detected gender */ /** detected gender */
gender?: string; gender?: Gender;
/** gender detection score */ /** gender detection score */
genderScore?: number; genderScore?: number;
/** detected emotions */ /** detected emotions */
emotion?: Array<{ emotion?: Array<{
score: number; score: number;
emotion: string; emotion: Emotion;
}>; }>;
/** detected race */ /** detected race */
race?: Array<{ race?: Array<{
score: number; score: number;
race: string; race: Race;
}>; }>;
/** face descriptor */ /** face descriptor */
embedding?: Array<number>; embedding?: Array<number>;
@ -646,6 +666,12 @@ export declare interface FilterConfig {
pixelate: number; pixelate: number;
} }
export declare type Finger = 'index' | 'middle' | 'pinky' | 'ring' | 'thumb' | 'palm';
export declare type FingerCurl = 'none' | 'half' | 'full';
export declare type FingerDirection = 'verticalUp' | 'verticalDown' | 'horizontalLeft' | 'horizontalRight' | 'diagonalUpRight' | 'diagonalUpLeft' | 'diagonalDownRight' | 'diagonalDownLeft';
/** /**
* Creates an IOHandler that loads model artifacts from memory. * Creates an IOHandler that loads model artifacts from memory.
* *
@ -669,6 +695,8 @@ export declare interface FilterConfig {
*/ */
declare function fromMemory(modelArtifacts: {} | ModelArtifacts, weightSpecs?: WeightsManifestEntry[], weightData?: ArrayBuffer, trainingConfig?: TrainingConfig): IOHandler; declare function fromMemory(modelArtifacts: {} | ModelArtifacts, weightSpecs?: WeightsManifestEntry[], weightData?: ArrayBuffer, trainingConfig?: TrainingConfig): IOHandler;
export declare type Gender = 'male' | 'female' | 'unknown';
/** Generic config type inherited by all module types */ /** Generic config type inherited by all module types */
export declare interface GenericConfig { export declare interface GenericConfig {
/** is module enabled? */ /** is module enabled? */
@ -970,16 +998,18 @@ export declare interface HandResult {
/** detected hand keypoints */ /** detected hand keypoints */
keypoints: Array<Point>; keypoints: Array<Point>;
/** detected hand class */ /** detected hand class */
label: string; label: HandType;
/** detected hand keypoints combined into annotated parts */ /** detected hand keypoints combined into annotated parts */
annotations: Record<'index' | 'middle' | 'pinky' | 'ring' | 'thumb' | 'palm', Array<Point>>; annotations: Record<Finger, Array<Point>>;
/** detected hand parts annotated with part gestures */ /** detected hand parts annotated with part gestures */
landmarks: Record<'index' | 'middle' | 'pinky' | 'ring' | 'thumb', { landmarks: Record<Finger, {
curl: 'none' | 'half' | 'full'; curl: FingerCurl;
direction: 'verticalUp' | 'verticalDown' | 'horizontalLeft' | 'horizontalRight' | 'diagonalUpRight' | 'diagonalUpLeft' | 'diagonalDownRight' | 'diagonalDownLeft'; direction: FingerDirection;
}>; }>;
} }
export declare type HandType = 'hand' | 'fist' | 'pinch' | 'point' | 'face' | 'tip' | 'pinchtip';
/** /**
* Creates an IOHandler subtype that sends model artifacts to HTTP server. * Creates an IOHandler subtype that sends model artifacts to HTTP server.
* *
@ -1865,13 +1895,15 @@ export declare interface ObjectResult {
/** detected object class id */ /** detected object class id */
class: number; class: number;
/** detected object class name */ /** detected object class name */
label: string; label: ObjectType;
/** detected object box */ /** detected object box */
box: Box; box: Box;
/** detected object box normalized to 0..1 */ /** detected object box normalized to 0..1 */
boxRaw: Box; boxRaw: Box;
} }
export declare type ObjectType = 'person' | 'bicycle' | 'car' | 'motorcycle' | 'airplane' | 'bus' | 'train' | 'truck' | 'boat' | 'traffic light' | 'fire hydrant' | 'stop sign' | 'parking meter' | 'bench' | 'bird' | 'cat' | 'dog' | 'horse' | 'sheep' | 'cow' | 'elephant' | 'bear' | 'zebra' | 'giraffe' | 'backpack' | 'umbrella' | 'handbag' | 'tie' | 'suitcase' | 'frisbee' | 'skis' | 'snowboard' | 'sports ball' | 'kite' | 'baseball bat' | 'baseball glove' | 'skateboard' | 'surfboard' | 'tennis racket' | 'bottle' | 'wine glass' | 'cup' | 'fork' | 'knife' | 'spoon' | 'bowl' | 'banana' | 'apple' | 'sandwich' | 'orange' | 'broccoli' | 'carrot' | 'hot dog' | 'pizza' | 'donut' | 'cake' | 'chair' | 'couch' | 'potted plant' | 'bed' | 'dining table' | 'toilet' | 'tv' | 'laptop' | 'mouse' | 'remote' | 'keyboard' | 'cell phone' | 'microwave' | 'oven' | 'toaster' | 'sink' | 'refrigerator' | 'book' | 'clock' | 'vase' | 'scissors' | 'teddy bear' | 'hair drier' | 'toothbrush';
/** /**
* Callback for the progress of a long-running action such as an HTTP * Callback for the progress of a long-running action such as an HTTP
* request for a large binary object. * request for a large binary object.
@ -1913,6 +1945,8 @@ export declare interface PersonResult {
/** generic point as [x, y, z?] */ /** generic point as [x, y, z?] */
export declare type Point = [number, number, number?]; export declare type Point = [number, number, number?];
export declare type Race = 'white' | 'black' | 'asian' | 'indian' | 'other';
export declare enum Rank { export declare enum Rank {
R0 = "R0", R0 = "R0",
R1 = "R1", R1 = "R1",

13
dist/human.node.js vendored
View File

@ -1563,7 +1563,7 @@ async function predict3(image29, config3, idx, count2) {
const normalize = tf7.mul(tf7.sub(grayscale, constants.tf05), 2); const normalize = tf7.mul(tf7.sub(grayscale, constants.tf05), 2);
return normalize; return normalize;
}); });
const obj = { gender: "", genderScore: 0 }; const obj = { gender: "unknown", genderScore: 0 };
if (config3.face["ssrnet"].enabled) if (config3.face["ssrnet"].enabled)
t.gender = model3.execute(t.enhance); t.gender = model3.execute(t.enhance);
const data = await t.gender.data(); const data = await t.gender.data();
@ -10708,7 +10708,8 @@ function scalePoses(poses, [height, width], [inputResolutionHeight, inputResolut
part, part,
position: [Math.trunc(position.x * scaleX), Math.trunc(position.y * scaleY)], position: [Math.trunc(position.x * scaleX), Math.trunc(position.y * scaleY)],
positionRaw: [position.x / inputResolutionHeight, position.y / inputResolutionHeight] positionRaw: [position.x / inputResolutionHeight, position.y / inputResolutionHeight]
})) })),
annotations: {}
}); });
const scaledPoses = poses.map((pose, i) => scalePose(pose, i)); const scaledPoses = poses.map((pose, i) => scalePose(pose, i));
return scaledPoses; return scaledPoses;
@ -12046,7 +12047,7 @@ var calculateFaceAngle = (face5, imageSize) => {
// src/face/face.ts // src/face/face.ts
var detectFace = async (instance, input) => { var detectFace = async (instance, input) => {
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z; var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v;
let timeStamp; let timeStamp;
let ageRes; let ageRes;
let gearRes; let gearRes;
@ -12159,12 +12160,10 @@ var detectFace = async (instance, input) => {
descRes = { age: gearRes.age, gender: gearRes.gender, genderScore: gearRes.genderScore, race: gearRes.race }; descRes = { age: gearRes.age, gender: gearRes.gender, genderScore: gearRes.genderScore, race: gearRes.race };
if (((_t = instance.config.face["mobilefacenet"]) == null ? void 0 : _t.enabled) && mobilefacenetRes) if (((_t = instance.config.face["mobilefacenet"]) == null ? void 0 : _t.enabled) && mobilefacenetRes)
descRes.descriptor = mobilefacenetRes; descRes.descriptor = mobilefacenetRes;
if (!((_u = instance.config.face.iris) == null ? void 0 : _u.enabled) && ((_w = (_v = faces[i]) == null ? void 0 : _v.annotations) == null ? void 0 : _w.leftEyeIris) && ((_y = (_x = faces[i]) == null ? void 0 : _x.annotations) == null ? void 0 : _y.rightEyeIris)) { if (!((_u = instance.config.face.iris) == null ? void 0 : _u.enabled)) {
delete faces[i].annotations.leftEyeIris;
delete faces[i].annotations.rightEyeIris;
} }
const irisSize = faces[i].annotations && faces[i].annotations.leftEyeIris && faces[i].annotations.leftEyeIris[0] && faces[i].annotations.rightEyeIris && faces[i].annotations.rightEyeIris[0] && faces[i].annotations.leftEyeIris.length > 0 && faces[i].annotations.rightEyeIris.length > 0 && faces[i].annotations.leftEyeIris[0] !== null && faces[i].annotations.rightEyeIris[0] !== null ? Math.max(Math.abs(faces[i].annotations.leftEyeIris[3][0] - faces[i].annotations.leftEyeIris[1][0]), Math.abs(faces[i].annotations.rightEyeIris[4][1] - faces[i].annotations.rightEyeIris[2][1])) / input.shape[2] : 0; const irisSize = faces[i].annotations && faces[i].annotations.leftEyeIris && faces[i].annotations.leftEyeIris[0] && faces[i].annotations.rightEyeIris && faces[i].annotations.rightEyeIris[0] && faces[i].annotations.leftEyeIris.length > 0 && faces[i].annotations.rightEyeIris.length > 0 && faces[i].annotations.leftEyeIris[0] !== null && faces[i].annotations.rightEyeIris[0] !== null ? Math.max(Math.abs(faces[i].annotations.leftEyeIris[3][0] - faces[i].annotations.leftEyeIris[1][0]), Math.abs(faces[i].annotations.rightEyeIris[4][1] - faces[i].annotations.rightEyeIris[2][1])) / input.shape[2] : 0;
const tensor3 = ((_z = instance.config.face.detector) == null ? void 0 : _z.return) ? tf34.squeeze(faces[i].tensor) : null; const tensor3 = ((_v = instance.config.face.detector) == null ? void 0 : _v.return) ? tf34.squeeze(faces[i].tensor) : null;
tf34.dispose(faces[i].tensor); tf34.dispose(faces[i].tensor);
if (faces[i].tensor) if (faces[i].tensor)
delete faces[i].tensor; delete faces[i].tensor;

63
dist/tfjs.esm.js vendored
View File

@ -4,7 +4,7 @@
author: <https://github.com/vladmandic>' author: <https://github.com/vladmandic>'
*/ */
// node_modules/.pnpm/github.com+vladmandic+tfjs@ec8da8eecf5953953242a07d5fdf48678057e85d/node_modules/@vladmandic/tfjs/dist/tfjs.esm.js // node_modules/.pnpm/github.com+vladmandic+tfjs@f5e397d84d40c89956e2e8f9ee694c16ff452ea2/node_modules/@vladmandic/tfjs/dist/tfjs.esm.js
var __create = Object.create; var __create = Object.create;
var __defProp = Object.defineProperty; var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@ -59035,25 +59035,21 @@ function getWorkGroupSizeString() {
[[stage(compute), workgroup_size(workGroupSizeX, workGroupSizeY, workGroupSizeZ)]] [[stage(compute), workgroup_size(workGroupSizeX, workGroupSizeY, workGroupSizeZ)]]
`; `;
} }
function getFlatDispatchLayoutMainHeaderString() { function getMainHeaderString() {
return ` return `
${getWorkGroupSizeString()} ${getWorkGroupSizeString()}
fn main([[builtin(local_invocation_id)]] localId : vec3<u32>, fn main([[builtin(local_invocation_id)]] LocalId : vec3<u32>,
[[builtin(global_invocation_id)]] globalId : vec3<u32>, [[builtin(global_invocation_id)]] GlobalId : vec3<u32>,
[[builtin(num_workgroups)]] numWorkgroups: vec3<u32>) [[builtin(num_workgroups)]] NumWorkgroups: vec3<u32>) {
`; localId = LocalId;
} globalId = GlobalId;
function getNonFlatDispatchLayoutMainHeaderString() { numWorkgroups = NumWorkgroups;
return `
${getWorkGroupSizeString()}
fn main([[builtin(local_invocation_id)]] localId : vec3<u32>,
[[builtin(global_invocation_id)]] globalId : vec3<u32>)
`; `;
} }
function getMainHeaderAndGlobalIndexString() { function getMainHeaderAndGlobalIndexString() {
return ` return `
${getFlatDispatchLayoutMainHeaderString()} { ${getMainHeaderString()}
let index = getGlobalIndex(globalId, localId, numWorkgroups); let index = getGlobalIndex();
`; `;
} }
function makeShader2(inputInfo, outputData, program, isFromPixel = false) { function makeShader2(inputInfo, outputData, program, isFromPixel = false) {
@ -59156,6 +59152,10 @@ function makeShader2(inputInfo, outputData, program, isFromPixel = false) {
return source; return source;
} }
var SHADER_PREFIX = ` var SHADER_PREFIX = `
var<private> localId: vec3<u32>;
var<private> globalId: vec3<u32>;
var<private> numWorkgroups: vec3<u32>;
fn idiv(a: i32, b: i32, sign: f32) -> i32 { fn idiv(a: i32, b: i32, sign: f32) -> i32 {
var res: i32 = a / b; var res: i32 = a / b;
let mod: i32 = a % b; let mod: i32 = a % b;
@ -59217,7 +59217,7 @@ var SAMPLING_SNIPPETS = `
} }
// Only used when the y/z dimension of workgroup size is 1. // Only used when the y/z dimension of workgroup size is 1.
fn getGlobalIndex(globalId : vec3<u32>, localId : vec3<u32>, numWorkgroups: vec3<u32>) -> i32 { fn getGlobalIndex() -> i32 {
if (numWorkgroups.y == 1u && numWorkgroups.z == 1u) { if (numWorkgroups.y == 1u && numWorkgroups.z == 1u) {
return i32(globalId.x); return i32(globalId.x);
} }
@ -59478,8 +59478,8 @@ function generateGetOutputCoords(outShape, dispatchLayout) {
const outRank = outShape.length; const outRank = outShape.length;
if (x.length === outRank) { if (x.length === outRank) {
const dtype2 = getCoordsDataType2(outRank); const dtype2 = getCoordsDataType2(outRank);
const snippet2 = `fn getOutputCoordsWithFlatDispatchLayout(globalId : vec3<u32>, localId : vec3<u32>, numWorkgroups: vec3<u32>) -> ${dtype2}{ const snippet2 = `fn getOutputCoords() -> ${dtype2}{
let globalIndex = getGlobalIndex(globalId, localId, numWorkgroups); let globalIndex = getGlobalIndex();
return getCoordsFromFlatIndex(globalIndex); return getCoordsFromFlatIndex(globalIndex);
} }
`; `;
@ -59514,7 +59514,7 @@ function generateGetOutputCoords(outShape, dispatchLayout) {
dimensions.push(`d${i}`); dimensions.push(`d${i}`);
} }
const dtype = getCoordsDataType2(rank); const dtype = getCoordsDataType2(rank);
let snippet = `fn getOutputCoordsWithNonFlatDispatchLayout(globalId : vec3<u32>) -> ${dtype} { let snippet = `fn getOutputCoords() -> ${dtype} {
${gatherDimensionsStr} ${gatherDimensionsStr}
`; `;
if (dimensions.length === 0) { if (dimensions.length === 0) {
@ -60035,7 +60035,7 @@ function makeMatMulPackedVec4Source(workPerThread, workGroupSize) {
let TileBOuter = ${tileInfo.TileBOuter}; let TileBOuter = ${tileInfo.TileBOuter};
let TileInner = ${tileInfo.TileInner}; let TileInner = ${tileInfo.TileInner};
${getNonFlatDispatchLayoutMainHeaderString()} { ${getMainHeaderString()}
let tileRow = i32(localId.y) * RowPerThread; let tileRow = i32(localId.y) * RowPerThread;
let tileCol = i32(localId.x); let tileCol = i32(localId.x);
@ -60094,13 +60094,13 @@ function makeMatMulPackedVec4Source(workPerThread, workGroupSize) {
globalCol, globalCol,
acc[innerRow], globalId); acc[innerRow], globalId);
} }
}`; }`;
} }
function makeMatMulVectorVec4Source(workGroupSize) { function makeMatMulVectorVec4Source(workGroupSize) {
return ` return `
var<workgroup> mm_Asub : array<vec4<f32>, ${workGroupSize[0]}>; var<workgroup> mm_Asub : array<vec4<f32>, ${workGroupSize[0]}>;
let tileSize = ${workGroupSize[0] * 4}; let tileSize = ${workGroupSize[0] * 4};
${getNonFlatDispatchLayoutMainHeaderString()} { ${getMainHeaderString()}
let tileCol = i32(localId.x); let tileCol = i32(localId.x);
let globalCol = i32(globalId.x); let globalCol = i32(globalId.x);
let globalRow = i32(globalId.y); let globalRow = i32(globalId.y);
@ -60250,7 +60250,7 @@ function makeMatMulPackedSource(workPerThread, workGroupSize) {
return ` return `
var<workgroup> mm_Asub : array<array<f32, ${tileInner}>, ${tileAOuter}>; var<workgroup> mm_Asub : array<array<f32, ${tileInner}>, ${tileAOuter}>;
var<workgroup> mm_Bsub : array<array<f32, ${tileBOuter}>, ${tileInner}>; var<workgroup> mm_Bsub : array<array<f32, ${tileBOuter}>, ${tileInner}>;
${getNonFlatDispatchLayoutMainHeaderString()} { ${getMainHeaderString()}
let tileRow = i32(localId.y) * ${workPerThread[1]}; let tileRow = i32(localId.y) * ${workPerThread[1]};
let tileCol = i32(localId.x) * ${workPerThread[0]}; let tileCol = i32(localId.x) * ${workPerThread[0]};
@ -60338,7 +60338,7 @@ function makeMatMulVectorSource(workGroupSize) {
let TileSize = ${workGroupSize[0] * 4}; let TileSize = ${workGroupSize[0] * 4};
var<workgroup> mm_Asub : array<vec4<f32>, ${workGroupSize[0]}>; var<workgroup> mm_Asub : array<vec4<f32>, ${workGroupSize[0]}>;
${getNonFlatDispatchLayoutMainHeaderString()} { ${getMainHeaderString()}
let tileCol = i32(localId.x); let tileCol = i32(localId.x);
let globalCol = i32(globalId.x); let globalCol = i32(globalId.x);
let globalRow = i32(globalId.y); let globalRow = i32(globalId.y);
@ -60505,8 +60505,8 @@ var MatMulPackedProgram2 = class {
function makeMatMulReduceSource() { function makeMatMulReduceSource() {
return ` return `
var<workgroup> sumValues : array<f32, workGroupSizeX>; var<workgroup> sumValues : array<f32, workGroupSizeX>;
${getNonFlatDispatchLayoutMainHeaderString()} { ${getMainHeaderString()}
let coords = getOutputCoordsWithNonFlatDispatchLayout(globalId); let coords = getOutputCoords();
let batch = coords[0]; let batch = coords[0];
let row = coords[1]; let row = coords[1];
let col = coords[2]; let col = coords[2];
@ -60631,7 +60631,7 @@ function makeMatMulSmallOutputSizeSource(workGroupSize) {
// arithmetic operations and others handle IO operations between barrier api, // arithmetic operations and others handle IO operations between barrier api,
// makes ALUs and load/store units work simultaneously, could improves // makes ALUs and load/store units work simultaneously, could improves
// the performance. // the performance.
${getNonFlatDispatchLayoutMainHeaderString()} { ${getMainHeaderString()}
let tileRow = i32(localId.y); let tileRow = i32(localId.y);
let tileCol = i32(localId.x); let tileCol = i32(localId.x);
let globalRow = i32(globalId.y); let globalRow = i32(globalId.y);
@ -62624,8 +62624,8 @@ var Conv2DNaiveProgram = class {
} }
} }
${getFlatDispatchLayoutMainHeaderString()} { ${getMainHeaderString()}
let coords = getOutputCoordsWithFlatDispatchLayout(globalId, localId, numWorkgroups); let coords = getOutputCoords();
let batch = coords[0]; let batch = coords[0];
let outChannel = coords[3]; let outChannel = coords[3];
@ -63253,9 +63253,8 @@ var DepthwiseConv2DProgram2 = class {
} }
} }
${getFlatDispatchLayoutMainHeaderString()} { ${getMainHeaderString()}
let coords = getOutputCoordsWithFlatDispatchLayout(globalId, let coords = getOutputCoords();
localId, numWorkgroups);
let batch = coords[0]; let batch = coords[0];
let xRCCorner = vec2<i32>(coords.yz) * uniforms.stride - uniforms.pad; let xRCCorner = vec2<i32>(coords.yz) * uniforms.stride - uniforms.pad;
let d2 = coords[3]; let d2 = coords[3];
@ -70304,7 +70303,7 @@ registerBackend("wasm", async () => {
const { wasm } = await init(); const { wasm } = await init();
return new BackendWasm(wasm); return new BackendWasm(wasm);
}, WASM_PRIORITY); }, WASM_PRIORITY);
var externalVersion = "3.12.0-20211214"; var externalVersion = "3.12.0-20211215";
var version8 = { var version8 = {
tfjs: externalVersion, tfjs: externalVersion,
"tfjs-core": externalVersion, "tfjs-core": externalVersion,

View File

@ -5,7 +5,7 @@
import * as tf from '../../dist/tfjs.esm.js'; import * as tf from '../../dist/tfjs.esm.js';
import { constants } from '../tfjs/constants'; import { constants } from '../tfjs/constants';
import { log, join, now } from '../util/util'; import { log, join, now } from '../util/util';
import type { BodyKeypoint, BodyResult, Box, Point } from '../result'; import type { BodyKeypoint, BodyResult, BodyLandmark, Box, Point, BodyAnnotation } from '../result';
import type { GraphModel, Tensor } from '../tfjs/types'; import type { GraphModel, Tensor } from '../tfjs/types';
import type { Config } from '../config'; import type { Config } from '../config';
import * as coords from './blazeposecoords'; import * as coords from './blazeposecoords';
@ -144,13 +144,13 @@ async function detectLandmarks(input: Tensor, config: Config, outputSize: [numbe
const adjScore = Math.trunc(100 * score * presence * poseScore) / 100; const adjScore = Math.trunc(100 * score * presence * poseScore) / 100;
const positionRaw: Point = [points[depth * i + 0] / inputSize.landmarks[0], points[depth * i + 1] / inputSize.landmarks[1], points[depth * i + 2] + 0]; const positionRaw: Point = [points[depth * i + 0] / inputSize.landmarks[0], points[depth * i + 1] / inputSize.landmarks[1], points[depth * i + 2] + 0];
const position: Point = [Math.trunc(outputSize[0] * positionRaw[0]), Math.trunc(outputSize[1] * positionRaw[1]), positionRaw[2] as number]; const position: Point = [Math.trunc(outputSize[0] * positionRaw[0]), Math.trunc(outputSize[1] * positionRaw[1]), positionRaw[2] as number];
keypointsRelative.push({ part: coords.kpt[i], positionRaw, position, score: adjScore }); keypointsRelative.push({ part: coords.kpt[i] as BodyLandmark, positionRaw, position, score: adjScore });
} }
if (poseScore < (config.body.minConfidence || 0)) return null; if (poseScore < (config.body.minConfidence || 0)) return null;
const keypoints: Array<BodyKeypoint> = rescaleKeypoints(keypointsRelative, outputSize); // keypoints were relative to input image which is padded const keypoints: Array<BodyKeypoint> = rescaleKeypoints(keypointsRelative, outputSize); // keypoints were relative to input image which is padded
const kpts = keypoints.map((k) => k.position); const kpts = keypoints.map((k) => k.position);
const boxes = box.calc(kpts, [outputSize[0], outputSize[1]]); // now find boxes based on rescaled keypoints const boxes = box.calc(kpts, [outputSize[0], outputSize[1]]); // now find boxes based on rescaled keypoints
const annotations: Record<string, Point[][]> = {}; const annotations: Record<BodyAnnotation, Point[][]> = {} as Record<BodyAnnotation, Point[][]>;
for (const [name, indexes] of Object.entries(coords.connected)) { for (const [name, indexes] of Object.entries(coords.connected)) {
const pt: Array<Point[]> = []; const pt: Array<Point[]> = [];
for (let i = 0; i < indexes.length - 1; i++) { for (let i = 0; i < indexes.length - 1; i++) {

View File

@ -8,14 +8,14 @@ import { log, join, now } from '../util/util';
import * as tf from '../../dist/tfjs.esm.js'; import * as tf from '../../dist/tfjs.esm.js';
import * as coords from './efficientposecoords'; import * as coords from './efficientposecoords';
import { constants } from '../tfjs/constants'; import { constants } from '../tfjs/constants';
import type { BodyResult, Point } from '../result'; import type { BodyResult, Point, BodyLandmark, BodyAnnotation } from '../result';
import type { GraphModel, Tensor } from '../tfjs/types'; import type { GraphModel, Tensor } from '../tfjs/types';
import type { Config } from '../config'; import type { Config } from '../config';
import { env } from '../util/env'; import { env } from '../util/env';
let model: GraphModel | null; let model: GraphModel | null;
let lastTime = 0; let lastTime = 0;
const cache: BodyResult = { id: 0, keypoints: [], box: [0, 0, 0, 0], boxRaw: [0, 0, 0, 0], score: 0, annotations: {} }; const cache: BodyResult = { id: 0, keypoints: [], box: [0, 0, 0, 0], boxRaw: [0, 0, 0, 0], score: 0, annotations: {} as Record<BodyAnnotation, Point[][]> };
// const keypoints: Array<BodyKeypoint> = []; // const keypoints: Array<BodyKeypoint> = [];
// let box: Box = [0, 0, 0, 0]; // let box: Box = [0, 0, 0, 0];
@ -88,7 +88,7 @@ export async function predict(image: Tensor, config: Config): Promise<BodyResult
if (partScore > (config.body?.minConfidence || 0)) { if (partScore > (config.body?.minConfidence || 0)) {
cache.keypoints.push({ cache.keypoints.push({
score: Math.round(100 * partScore) / 100, score: Math.round(100 * partScore) / 100,
part: coords.kpt[id], part: coords.kpt[id] as BodyLandmark,
positionRaw: [ // normalized to 0..1 positionRaw: [ // normalized to 0..1
// @ts-ignore model is not undefined here // @ts-ignore model is not undefined here
x / model.inputs[0].shape[2], y / model.inputs[0].shape[1], x / model.inputs[0].shape[2], y / model.inputs[0].shape[1],

View File

@ -9,7 +9,7 @@ import * as box from '../util/box';
import * as tf from '../../dist/tfjs.esm.js'; import * as tf from '../../dist/tfjs.esm.js';
import * as coords from './movenetcoords'; import * as coords from './movenetcoords';
import * as fix from './movenetfix'; import * as fix from './movenetfix';
import type { BodyKeypoint, BodyResult, Box, Point } from '../result'; import type { BodyKeypoint, BodyResult, BodyLandmark, BodyAnnotation, Box, Point } from '../result';
import type { GraphModel, Tensor } from '../tfjs/types'; import type { GraphModel, Tensor } from '../tfjs/types';
import type { Config } from '../config'; import type { Config } from '../config';
import { fakeOps } from '../tfjs/backend'; import { fakeOps } from '../tfjs/backend';
@ -52,7 +52,7 @@ async function parseSinglePose(res, config, image) {
const positionRaw: Point = [kpt[id][1], kpt[id][0]]; const positionRaw: Point = [kpt[id][1], kpt[id][0]];
keypoints.push({ keypoints.push({
score: Math.round(100 * score) / 100, score: Math.round(100 * score) / 100,
part: coords.kpt[id], part: coords.kpt[id] as BodyLandmark,
positionRaw, positionRaw,
position: [ // normalized to input image size position: [ // normalized to input image size
Math.round((image.shape[2] || 0) * positionRaw[0]), Math.round((image.shape[2] || 0) * positionRaw[0]),
@ -92,7 +92,7 @@ async function parseMultiPose(res, config, image) {
if (score > config.body.minConfidence) { if (score > config.body.minConfidence) {
const positionRaw: Point = [kpt[3 * i + 1], kpt[3 * i + 0]]; const positionRaw: Point = [kpt[3 * i + 1], kpt[3 * i + 0]];
keypoints.push({ keypoints.push({
part: coords.kpt[i], part: coords.kpt[i] as BodyLandmark,
score: Math.round(100 * score) / 100, score: Math.round(100 * score) / 100,
positionRaw, positionRaw,
position: [Math.round((image.shape[2] || 0) * positionRaw[0]), Math.round((image.shape[1] || 0) * positionRaw[1])], position: [Math.round((image.shape[2] || 0) * positionRaw[0]), Math.round((image.shape[1] || 0) * positionRaw[1])],
@ -103,7 +103,7 @@ async function parseMultiPose(res, config, image) {
// movenet-multipose has built-in box details // movenet-multipose has built-in box details
// const boxRaw: Box = [kpt[51 + 1], kpt[51 + 0], kpt[51 + 3] - kpt[51 + 1], kpt[51 + 2] - kpt[51 + 0]]; // const boxRaw: Box = [kpt[51 + 1], kpt[51 + 0], kpt[51 + 3] - kpt[51 + 1], kpt[51 + 2] - kpt[51 + 0]];
// const box: Box = [Math.trunc(boxRaw[0] * (image.shape[2] || 0)), Math.trunc(boxRaw[1] * (image.shape[1] || 0)), Math.trunc(boxRaw[2] * (image.shape[2] || 0)), Math.trunc(boxRaw[3] * (image.shape[1] || 0))]; // const box: Box = [Math.trunc(boxRaw[0] * (image.shape[2] || 0)), Math.trunc(boxRaw[1] * (image.shape[1] || 0)), Math.trunc(boxRaw[2] * (image.shape[2] || 0)), Math.trunc(boxRaw[3] * (image.shape[1] || 0))];
const annotations: Record<string, Point[][]> = {}; const annotations: Record<BodyAnnotation, Point[][]> = {} as Record<BodyAnnotation, Point[][]>;
for (const [name, indexes] of Object.entries(coords.connected)) { for (const [name, indexes] of Object.entries(coords.connected)) {
const pt: Array<Point[]> = []; const pt: Array<Point[]> = [];
for (let i = 0; i < indexes.length - 1; i++) { for (let i = 0; i < indexes.length - 1; i++) {

View File

@ -6,7 +6,7 @@
import { log, join } from '../util/util'; import { log, join } from '../util/util';
import * as tf from '../../dist/tfjs.esm.js'; import * as tf from '../../dist/tfjs.esm.js';
import type { BodyResult, Box } from '../result'; import type { BodyResult, BodyLandmark, Box } from '../result';
import type { Tensor, GraphModel } from '../tfjs/types'; import type { Tensor, GraphModel } from '../tfjs/types';
import type { Config } from '../config'; import type { Config } from '../config';
import { env } from '../util/env'; import { env } from '../util/env';
@ -14,7 +14,6 @@ import * as utils from './posenetutils';
let model: GraphModel; let model: GraphModel;
const poseNetOutputs = ['MobilenetV1/offset_2/BiasAdd'/* offsets */, 'MobilenetV1/heatmap_2/BiasAdd'/* heatmapScores */, 'MobilenetV1/displacement_fwd_2/BiasAdd'/* displacementFwd */, 'MobilenetV1/displacement_bwd_2/BiasAdd'/* displacementBwd */]; const poseNetOutputs = ['MobilenetV1/offset_2/BiasAdd'/* offsets */, 'MobilenetV1/heatmap_2/BiasAdd'/* heatmapScores */, 'MobilenetV1/displacement_fwd_2/BiasAdd'/* displacementFwd */, 'MobilenetV1/displacement_bwd_2/BiasAdd'/* displacementBwd */];
const localMaximumRadius = 1; const localMaximumRadius = 1;
const outputStride = 16; const outputStride = 16;
const squaredNmsRadius = 50 ** 2; const squaredNmsRadius = 50 ** 2;
@ -59,7 +58,7 @@ export function decodePose(root, scores, offsets, displacementsFwd, displacement
const rootPoint = utils.getImageCoords(root.part, outputStride, offsets); const rootPoint = utils.getImageCoords(root.part, outputStride, offsets);
keypoints[root.part.id] = { keypoints[root.part.id] = {
score: root.score, score: root.score,
part: utils.partNames[root.part.id], part: utils.partNames[root.part.id] as BodyLandmark,
position: rootPoint, position: rootPoint,
}; };
// Decode the part positions upwards in the tree, following the backward displacements. // Decode the part positions upwards in the tree, following the backward displacements.

View File

@ -3,7 +3,7 @@
* See `posenet.ts` for entry point * See `posenet.ts` for entry point
*/ */
import type { BodyResult } from '../result'; import type { Point, BodyResult, BodyAnnotation, BodyLandmark } from '../result';
export const partNames = [ export const partNames = [
'nose', 'leftEye', 'rightEye', 'leftEar', 'rightEar', 'leftShoulder', 'nose', 'leftEye', 'rightEye', 'leftEar', 'rightEar', 'leftShoulder',
@ -71,17 +71,18 @@ export function getBoundingBox(keypoints): [number, number, number, number] {
export function scalePoses(poses, [height, width], [inputResolutionHeight, inputResolutionWidth]): Array<BodyResult> { export function scalePoses(poses, [height, width], [inputResolutionHeight, inputResolutionWidth]): Array<BodyResult> {
const scaleY = height / inputResolutionHeight; const scaleY = height / inputResolutionHeight;
const scaleX = width / inputResolutionWidth; const scaleX = width / inputResolutionWidth;
const scalePose = (pose, i) => ({ const scalePose = (pose, i): BodyResult => ({
id: i, id: i,
score: pose.score, score: pose.score,
boxRaw: [pose.box[0] / inputResolutionWidth, pose.box[1] / inputResolutionHeight, pose.box[2] / inputResolutionWidth, pose.box[3] / inputResolutionHeight], boxRaw: [pose.box[0] / inputResolutionWidth, pose.box[1] / inputResolutionHeight, pose.box[2] / inputResolutionWidth, pose.box[3] / inputResolutionHeight],
box: [Math.trunc(pose.box[0] * scaleX), Math.trunc(pose.box[1] * scaleY), Math.trunc(pose.box[2] * scaleX), Math.trunc(pose.box[3] * scaleY)], box: [Math.trunc(pose.box[0] * scaleX), Math.trunc(pose.box[1] * scaleY), Math.trunc(pose.box[2] * scaleX), Math.trunc(pose.box[3] * scaleY)],
keypoints: pose.keypoints.map(({ score, part, position }) => ({ keypoints: pose.keypoints.map(({ score, part, position }) => ({
score, score: score as number,
part, part: part as BodyLandmark,
position: [Math.trunc(position.x * scaleX), Math.trunc(position.y * scaleY)], position: [Math.trunc(position.x * scaleX), Math.trunc(position.y * scaleY)] as Point,
positionRaw: [position.x / inputResolutionHeight, position.y / inputResolutionHeight], positionRaw: [position.x / inputResolutionHeight, position.y / inputResolutionHeight] as Point,
})), })),
annotations: {} as Record<BodyAnnotation, Point[][]>,
}); });
const scaledPoses = poses.map((pose, i) => scalePose(pose, i)); const scaledPoses = poses.map((pose, i) => scalePose(pose, i));
return scaledPoses; return scaledPoses;

View File

@ -241,7 +241,6 @@ export interface Config {
* default: `full` * default: `full`
*/ */
warmup: '' | 'none' | 'face' | 'full' | 'body', warmup: '' | 'none' | 'face' | 'full' | 'body',
// warmup: string;
/** Base model path (typically starting with file://, http:// or https://) for all models /** Base model path (typically starting with file://, http:// or https://) for all models
* - individual modelPath values are relative to this path * - individual modelPath values are relative to this path

View File

@ -11,6 +11,7 @@ export type { Box, Point } from './result';
export type { Models } from './models'; export type { Models } from './models';
export type { Env } from './util/env'; export type { Env } from './util/env';
export type { FaceGesture, BodyGesture, HandGesture, IrisGesture } from './gesture/gesture'; export type { FaceGesture, BodyGesture, HandGesture, IrisGesture } from './gesture/gesture';
export type { Emotion, Finger, FingerCurl, FingerDirection, HandType, Gender, Race, FaceLandmark, BodyLandmark, BodyAnnotation, ObjectType } from './result';
export { env } from './util/env'; export { env } from './util/env';
/** Events dispatched by `human.events` /** Events dispatched by `human.events`

View File

@ -162,9 +162,9 @@ export const detectFace = async (instance: Human /* instance of human */, input:
// calculate iris distance // calculate iris distance
// iris: array[ center, left, top, right, bottom] // iris: array[ center, left, top, right, bottom]
if (!instance.config.face.iris?.enabled && faces[i]?.annotations?.leftEyeIris && faces[i]?.annotations?.rightEyeIris) { if (!instance.config.face.iris?.enabled) {
delete faces[i].annotations.leftEyeIris; // if (faces[i]?.annotations?.leftEyeIris) delete faces[i].annotations.leftEyeIris;
delete faces[i].annotations.rightEyeIris; // if (faces[i]?.annotations?.rightEyeIris) delete faces[i].annotations.rightEyeIris;
} }
const irisSize = (faces[i].annotations && faces[i].annotations.leftEyeIris && faces[i].annotations.leftEyeIris[0] && faces[i].annotations.rightEyeIris && faces[i].annotations.rightEyeIris[0] const irisSize = (faces[i].annotations && faces[i].annotations.leftEyeIris && faces[i].annotations.leftEyeIris[0] && faces[i].annotations.rightEyeIris && faces[i].annotations.rightEyeIris[0]
&& (faces[i].annotations.leftEyeIris.length > 0) && (faces[i].annotations.rightEyeIris.length > 0) && (faces[i].annotations.leftEyeIris.length > 0) && (faces[i].annotations.rightEyeIris.length > 0)

View File

@ -16,7 +16,7 @@ import * as iris from './iris';
import { histogramEqualization } from '../image/enhance'; import { histogramEqualization } from '../image/enhance';
import { env } from '../util/env'; import { env } from '../util/env';
import type { GraphModel, Tensor } from '../tfjs/types'; import type { GraphModel, Tensor } from '../tfjs/types';
import type { FaceResult, Point } from '../result'; import type { FaceResult, FaceLandmark, Point } from '../result';
import type { Config } from '../config'; import type { Config } from '../config';
type DetectBox = { startPoint: Point, endPoint: Point, landmarks: Array<Point>, confidence: number }; type DetectBox = { startPoint: Point, endPoint: Point, landmarks: Array<Point>, confidence: number };
@ -62,7 +62,7 @@ export async function predict(input: Tensor, config: Config): Promise<FaceResult
score: 0, score: 0,
boxScore: 0, boxScore: 0,
faceScore: 0, faceScore: 0,
annotations: {}, annotations: {} as Record<FaceLandmark, Point[]>,
}; };
// optional rotation correction based on detector data only if mesh is disabled otherwise perform it later when we have more accurate mesh data. if no rotation correction this function performs crop // optional rotation correction based on detector data only if mesh is disabled otherwise perform it later when we have more accurate mesh data. if no rotation correction this function performs crop

View File

@ -4,6 +4,7 @@
* [**Oarriaga**](https://github.com/oarriaga/face_classification) * [**Oarriaga**](https://github.com/oarriaga/face_classification)
*/ */
import type { Emotion } from '../result';
import { log, join, now } from '../util/util'; import { log, join, now } from '../util/util';
import type { Config } from '../config'; import type { Config } from '../config';
import type { GraphModel, Tensor } from '../tfjs/types'; import type { GraphModel, Tensor } from '../tfjs/types';
@ -13,7 +14,7 @@ import { constants } from '../tfjs/constants';
const annotations = ['angry', 'disgust', 'fear', 'happy', 'sad', 'surprise', 'neutral']; const annotations = ['angry', 'disgust', 'fear', 'happy', 'sad', 'surprise', 'neutral'];
let model: GraphModel | null; let model: GraphModel | null;
const last: Array<Array<{ score: number, emotion: string }>> = []; const last: Array<Array<{ score: number, emotion: Emotion }>> = [];
let lastCount = 0; let lastCount = 0;
let lastTime = 0; let lastTime = 0;
let skipped = Number.MAX_SAFE_INTEGER; let skipped = Number.MAX_SAFE_INTEGER;
@ -28,7 +29,7 @@ export async function load(config: Config): Promise<GraphModel> {
return model; return model;
} }
export async function predict(image: Tensor, config: Config, idx: number, count: number): Promise<Array<{ score: number, emotion: string }>> { export async function predict(image: Tensor, config: Config, idx: number, count: number): Promise<Array<{ score: number, emotion: Emotion }>> {
if (!model) return []; if (!model) return [];
const skipFrame = skipped < (config.face.emotion?.skipFrames || 0); const skipFrame = skipped < (config.face.emotion?.skipFrames || 0);
const skipTime = (config.face.emotion?.skipTime || 0) > (now() - lastTime); const skipTime = (config.face.emotion?.skipTime || 0) > (now() - lastTime);
@ -38,7 +39,7 @@ export async function predict(image: Tensor, config: Config, idx: number, count:
} }
skipped = 0; skipped = 0;
return new Promise(async (resolve) => { return new Promise(async (resolve) => {
const obj: Array<{ score: number, emotion: string }> = []; const obj: Array<{ score: number, emotion: Emotion }> = [];
if (config.face.emotion?.enabled) { if (config.face.emotion?.enabled) {
const t: Record<string, Tensor> = {}; const t: Record<string, Tensor> = {};
const inputSize = model?.inputs[0].shape ? model.inputs[0].shape[2] : 0; const inputSize = model?.inputs[0].shape ? model.inputs[0].shape[2] : 0;
@ -59,7 +60,7 @@ export async function predict(image: Tensor, config: Config, idx: number, count:
lastTime = now(); lastTime = now();
const data = await t.emotion.data(); const data = await t.emotion.data();
for (let i = 0; i < data.length; i++) { for (let i = 0; i < data.length; i++) {
if (data[i] > (config.face.emotion?.minConfidence || 0)) obj.push({ score: Math.min(0.99, Math.trunc(100 * data[i]) / 100), emotion: annotations[i] }); if (data[i] > (config.face.emotion?.minConfidence || 0)) obj.push({ score: Math.min(0.99, Math.trunc(100 * data[i]) / 100), emotion: annotations[i] as Emotion });
} }
obj.sort((a, b) => b.score - a.score); obj.sort((a, b) => b.score - a.score);
Object.keys(t).forEach((tensor) => tf.dispose(t[tensor])); Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));

View File

@ -6,11 +6,12 @@
import { log, join, now } from '../util/util'; import { log, join, now } from '../util/util';
import * as tf from '../../dist/tfjs.esm.js'; import * as tf from '../../dist/tfjs.esm.js';
import type { Gender, Race } from '../result';
import type { Config } from '../config'; import type { Config } from '../config';
import type { GraphModel, Tensor } from '../tfjs/types'; import type { GraphModel, Tensor } from '../tfjs/types';
import { env } from '../util/env'; import { env } from '../util/env';
type GearType = { age: number, gender: string, genderScore: number, race: Array<{ score: number, race: string }> } type GearType = { age: number, gender: Gender, genderScore: number, race: Array<{ score: number, race: Race }> }
let model: GraphModel | null; let model: GraphModel | null;
const last: Array<GearType> = []; const last: Array<GearType> = [];
const raceNames = ['white', 'black', 'asian', 'indian', 'other']; const raceNames = ['white', 'black', 'asian', 'indian', 'other'];
@ -53,7 +54,7 @@ export async function predict(image: Tensor, config: Config, idx, count): Promis
obj.genderScore = Math.round(100 * (gender[0] > gender[1] ? gender[0] : gender[1])) / 100; obj.genderScore = Math.round(100 * (gender[0] > gender[1] ? gender[0] : gender[1])) / 100;
const race = await t.race.data(); const race = await t.race.data();
for (let i = 0; i < race.length; i++) { for (let i = 0; i < race.length; i++) {
if (race[i] > (config.face['gear']?.minConfidence || 0.2)) obj.race.push({ score: Math.round(100 * race[i]) / 100, race: raceNames[i] }); if (race[i] > (config.face['gear']?.minConfidence || 0.2)) obj.race.push({ score: Math.round(100 * race[i]) / 100, race: raceNames[i] as Race });
} }
obj.race.sort((a, b) => b.score - a.score); obj.race.sort((a, b) => b.score - a.score);
// {0: 'Below20', 1: '21-25', 2: '26-30', 3: '31-40',4: '41-50', 5: '51-60', 6: 'Above60'} // {0: 'Below20', 1: '21-25', 2: '26-30', 3: '31-40',4: '41-50', 5: '51-60', 6: 'Above60'}

View File

@ -7,12 +7,13 @@
import { log, join, now } from '../util/util'; import { log, join, now } from '../util/util';
import * as tf from '../../dist/tfjs.esm.js'; import * as tf from '../../dist/tfjs.esm.js';
import { constants } from '../tfjs/constants'; import { constants } from '../tfjs/constants';
import type { Gender } from '../result';
import type { Config } from '../config'; import type { Config } from '../config';
import type { GraphModel, Tensor } from '../tfjs/types'; import type { GraphModel, Tensor } from '../tfjs/types';
import { env } from '../util/env'; import { env } from '../util/env';
let model: GraphModel | null; let model: GraphModel | null;
const last: Array<{ gender: string, genderScore: number }> = []; const last: Array<{ gender: Gender, genderScore: number }> = [];
let lastCount = 0; let lastCount = 0;
let lastTime = 0; let lastTime = 0;
let skipped = Number.MAX_SAFE_INTEGER; let skipped = Number.MAX_SAFE_INTEGER;
@ -32,7 +33,7 @@ export async function load(config: Config | any) {
} }
// eslint-disable-next-line @typescript-eslint/no-explicit-any // eslint-disable-next-line @typescript-eslint/no-explicit-any
export async function predict(image: Tensor, config: Config, idx, count): Promise<{ gender: string, genderScore: number }> { export async function predict(image: Tensor, config: Config, idx, count): Promise<{ gender: Gender, genderScore: number }> {
if (!model) return { gender: 'unknown', genderScore: 0 }; if (!model) return { gender: 'unknown', genderScore: 0 };
const skipFrame = skipped < (config.face['ssrnet']?.skipFrames || 0); const skipFrame = skipped < (config.face['ssrnet']?.skipFrames || 0);
const skipTime = (config.face['ssrnet']?.skipTime || 0) > (now() - lastTime); const skipTime = (config.face['ssrnet']?.skipTime || 0) > (now() - lastTime);
@ -54,7 +55,7 @@ export async function predict(image: Tensor, config: Config, idx, count): Promis
const normalize = tf.mul(tf.sub(grayscale, constants.tf05), 2); // range grayscale:-1..1 const normalize = tf.mul(tf.sub(grayscale, constants.tf05), 2); // range grayscale:-1..1
return normalize; return normalize;
}); });
const obj = { gender: '', genderScore: 0 }; const obj: { gender: Gender, genderScore: number } = { gender: 'unknown', genderScore: 0 };
if (config.face['ssrnet'].enabled) t.gender = model.execute(t.enhance) as Tensor; if (config.face['ssrnet'].enabled) t.gender = model.execute(t.enhance) as Tensor;
const data = await t.gender.data(); const data = await t.gender.data();
obj.gender = data[0] > data[1] ? 'female' : 'male'; // returns two values 0..1, bigger one is prediction obj.gender = data[0] > data[1] ? 'female' : 'male'; // returns two values 0..1, bigger one is prediction

View File

@ -9,7 +9,7 @@
import { log, join, now } from '../util/util'; import { log, join, now } from '../util/util';
import * as box from '../util/box'; import * as box from '../util/box';
import * as tf from '../../dist/tfjs.esm.js'; import * as tf from '../../dist/tfjs.esm.js';
import type { HandResult, Box, Point } from '../result'; import type { HandResult, HandType, Box, Point } from '../result';
import type { GraphModel, Tensor } from '../tfjs/types'; import type { GraphModel, Tensor } from '../tfjs/types';
import type { Config } from '../config'; import type { Config } from '../config';
import { env } from '../util/env'; import { env } from '../util/env';
@ -39,7 +39,7 @@ type HandDetectResult = {
box: Box, box: Box,
boxRaw: Box, boxRaw: Box,
boxCrop: Box, boxCrop: Box,
label: string, label: HandType,
} }
const cache: { const cache: {
@ -129,7 +129,7 @@ async function detectHands(input: Tensor, config: Config): Promise<HandDetectRes
const boxCrop: Box = box.crop(boxRaw); // crop box is based on raw box const boxCrop: Box = box.crop(boxRaw); // crop box is based on raw box
const boxFull: Box = [Math.trunc(boxData[0] * outputSize[0]), Math.trunc(boxData[1] * outputSize[1]), Math.trunc(boxData[2] * outputSize[0]), Math.trunc(boxData[3] * outputSize[1])]; const boxFull: Box = [Math.trunc(boxData[0] * outputSize[0]), Math.trunc(boxData[1] * outputSize[1]), Math.trunc(boxData[2] * outputSize[0]), Math.trunc(boxData[3] * outputSize[1])];
const score = scores[nmsIndex]; const score = scores[nmsIndex];
const label = classes[classNum[nmsIndex]]; const label = classes[classNum[nmsIndex]] as HandType;
const hand: HandDetectResult = { id: id++, score, box: boxFull, boxRaw, boxCrop, label }; const hand: HandDetectResult = { id: id++, score, box: boxFull, boxRaw, boxCrop, label };
hands.push(hand); hands.push(hand);
} }

View File

@ -7,7 +7,7 @@
import { log, join, now } from '../util/util'; import { log, join, now } from '../util/util';
import * as tf from '../../dist/tfjs.esm.js'; import * as tf from '../../dist/tfjs.esm.js';
import { labels } from './labels'; import { labels } from './labels';
import type { ObjectResult, Box } from '../result'; import type { ObjectResult, ObjectType, Box } from '../result';
import type { GraphModel, Tensor } from '../tfjs/types'; import type { GraphModel, Tensor } from '../tfjs/types';
import type { Config } from '../config'; import type { Config } from '../config';
import { env } from '../util/env'; import { env } from '../util/env';
@ -49,7 +49,7 @@ async function process(res: Tensor | null, outputShape, config: Config) {
for (const id of Array.from(nms)) { for (const id of Array.from(nms)) {
const score = Math.trunc(100 * detections[0][id][4]) / 100; const score = Math.trunc(100 * detections[0][id][4]) / 100;
const classVal = detections[0][id][5]; const classVal = detections[0][id][5];
const label = labels[classVal].label; const label = labels[classVal].label as ObjectType;
const [x, y] = [ const [x, y] = [
detections[0][id][0] / inputSize, detections[0][id][0] / inputSize,
detections[0][id][1] / inputSize, detections[0][id][1] / inputSize,

View File

@ -8,7 +8,7 @@ import { log, join, now } from '../util/util';
import * as tf from '../../dist/tfjs.esm.js'; import * as tf from '../../dist/tfjs.esm.js';
import { constants } from '../tfjs/constants'; import { constants } from '../tfjs/constants';
import { labels } from './labels'; import { labels } from './labels';
import type { ObjectResult, Box } from '../result'; import type { ObjectResult, ObjectType, Box } from '../result';
import type { GraphModel, Tensor } from '../tfjs/types'; import type { GraphModel, Tensor } from '../tfjs/types';
import type { Config } from '../config'; import type { Config } from '../config';
import { env } from '../util/env'; import { env } from '../util/env';
@ -72,7 +72,7 @@ async function process(res, inputSize, outputShape, config) {
// strideSize, // strideSize,
score: Math.round(100 * score) / 100, score: Math.round(100 * score) / 100,
class: j + 1, class: j + 1,
label: labels[j].label, label: labels[j].label as ObjectType,
// center: [Math.trunc(outputShape[0] * cx), Math.trunc(outputShape[1] * cy)], // center: [Math.trunc(outputShape[0] * cx), Math.trunc(outputShape[1] * cy)],
// centerRaw: [cx, cy], // centerRaw: [cx, cy],
box: box.map((a) => Math.trunc(a)) as Box, box: box.map((a) => Math.trunc(a)) as Box,

View File

@ -11,6 +11,15 @@ export type Box = [number, number, number, number];
/** generic point as [x, y, z?] */ /** generic point as [x, y, z?] */
export type Point = [number, number, number?]; export type Point = [number, number, number?];
export type Emotion = 'angry' | 'disgust' | 'fear' | 'happy' | 'sad' | 'surprise' | 'neutral';
export type Gender = 'male' | 'female' | 'unknown';
export type Race = 'white' | 'black' | 'asian' | 'indian' | 'other';
export type FaceLandmark = 'leftEye' | 'rightEye' | 'nose' | 'mouth' | 'leftEar' | 'rightEar' | 'symmetryLine' | 'silhouette'
| 'lipsUpperOuter' | 'lipsLowerOuter' | 'lipsUpperInner' | 'lipsLowerInner'
| 'rightEyeUpper0' | 'rightEyeLower0' | 'rightEyeUpper1' | 'rightEyeLower1' | 'rightEyeUpper2' | 'rightEyeLower2' | 'rightEyeLower3' | 'rightEyebrowUpper' | 'rightEyebrowLower' | 'rightEyeIris'
| 'leftEyeUpper0' | 'leftEyeLower0' | 'leftEyeUpper1' | 'leftEyeLower1' | 'leftEyeUpper2' | 'leftEyeLower2' | 'leftEyeLower3' | 'leftEyebrowUpper' | 'leftEyebrowLower' | 'leftEyeIris'
| 'midwayBetweenEyes' | 'noseTip' | 'noseBottom' | 'noseRightCorner' | 'noseLeftCorner' | 'rightCheek' | 'leftCheek';
/** Face results /** Face results
* - Combined results of face detector, face mesh, age, gender, emotion, embedding, iris models * - Combined results of face detector, face mesh, age, gender, emotion, embedding, iris models
* - Some values may be null if specific model is not enabled * - Some values may be null if specific model is not enabled
@ -33,17 +42,17 @@ export interface FaceResult {
/** detected face mesh normalized to 0..1 */ /** detected face mesh normalized to 0..1 */
meshRaw: Array<Point> meshRaw: Array<Point>
/** mesh keypoints combined into annotated results */ /** mesh keypoints combined into annotated results */
annotations: Record<string, Point[]>, annotations: Record<FaceLandmark, Point[]>,
/** detected age */ /** detected age */
age?: number, age?: number,
/** detected gender */ /** detected gender */
gender?: string, gender?: Gender,
/** gender detection score */ /** gender detection score */
genderScore?: number, genderScore?: number,
/** detected emotions */ /** detected emotions */
emotion?: Array<{ score: number, emotion: string }>, emotion?: Array<{ score: number, emotion: Emotion }>,
/** detected race */ /** detected race */
race?: Array<{ score: number, race: string }>, race?: Array<{ score: number, race: Race }>,
/** face descriptor */ /** face descriptor */
embedding?: Array<number>, embedding?: Array<number>,
/** face iris distance from camera */ /** face iris distance from camera */
@ -62,10 +71,21 @@ export interface FaceResult {
tensor?: Tensor, tensor?: Tensor,
} }
export type BodyLandmarkPoseNet = 'nose' | 'leftEye' | 'rightEye' | 'leftEar' | 'rightEar' | 'leftShoulder' | 'rightShoulder' | 'leftElbow' | 'rightElbow' | 'leftWrist' | 'rightWrist' | 'leftHip' | 'rightHip' | 'leftKnee' | 'rightKnee' | 'leftAnkle' | 'rightAnkle';
export type BodyLandmarkMoveNet = 'nose' | 'leftEye' | 'rightEye' | 'leftEar' | 'rightEar' | 'leftShoulder' | 'rightShoulder' | 'leftElbow' | 'rightElbow' | 'leftWrist' | 'rightWrist' | 'leftHip' | 'rightHip' | 'leftKnee' | 'rightKnee' | 'leftAnkle' | 'rightAnkle';
export type BodyLandmarkEfficientNet = 'head' | 'neck' | 'rightShoulder' | 'rightElbow' | 'rightWrist' | 'chest' | 'leftShoulder' | 'leftElbow' | 'leftWrist' | 'bodyCenter' | 'rightHip' | 'rightKnee' | 'rightAnkle' | 'leftHip' | 'leftKnee' | 'leftAnkle';
export type BodyLandmarkBlazePose = 'nose' | 'leftEyeInside' | 'leftEye' | 'leftEyeOutside' | 'rightEyeInside' | 'rightEye' | 'rightEyeOutside' | 'leftEar' | 'rightEar' | 'leftMouth' | 'rightMouth' | 'leftShoulder' | 'rightShoulder'
| 'leftElbow' | 'rightElbow' | 'leftWrist' | 'rightWrist' | 'leftPinky' | 'rightPinky' | 'leftIndex' | 'rightIndex' | 'leftThumb' | 'rightThumb' | 'leftHip' | 'rightHip' | 'leftKnee' | 'rightKnee' | 'leftAnkle' | 'rightAnkle'
| 'leftHeel' | 'rightHeel' | 'leftFoot' | 'rightFoot' | 'bodyCenter' | 'bodyTop' | 'leftPalm' | 'leftHand' | 'rightPalm' | 'rightHand';
export type BodyLandmark = BodyLandmarkPoseNet | BodyLandmarkMoveNet | BodyLandmarkEfficientNet | BodyLandmarkBlazePose;
export type BodyAnnotationBlazePose = 'leftLeg' | 'rightLeg' | 'torso' | 'leftArm' | 'rightArm' | 'leftEye' | 'rightEye' | 'mouth';
export type BodyAnnotationEfficientPose = 'leftLeg' | 'rightLeg' | 'torso' | 'leftArm' | 'rightArm' | 'head';
export type BodyAnnotation = BodyAnnotationBlazePose | BodyAnnotationEfficientPose;
/** Body Result keypoints */ /** Body Result keypoints */
export interface BodyKeypoint { export interface BodyKeypoint {
/** body part name */ /** body part name */
part: string, part: BodyLandmark,
/** body part position */ /** body part position */
position: Point, position: Point,
/** body part position normalized to 0..1 */ /** body part position normalized to 0..1 */
@ -87,9 +107,14 @@ export interface BodyResult {
/** detected body keypoints */ /** detected body keypoints */
keypoints: Array<BodyKeypoint> keypoints: Array<BodyKeypoint>
/** detected body keypoints combined into annotated parts */ /** detected body keypoints combined into annotated parts */
annotations: Record<string, Array<Point[]>>, annotations: Record<BodyAnnotation, Point[][]>,
} }
export type HandType = 'hand' | 'fist' | 'pinch' | 'point' | 'face' | 'tip' | 'pinchtip';
export type Finger = 'index' | 'middle' | 'pinky' | 'ring' | 'thumb' | 'palm';
export type FingerCurl = 'none' | 'half' | 'full';
export type FingerDirection = 'verticalUp' | 'verticalDown' | 'horizontalLeft' | 'horizontalRight' | 'diagonalUpRight' | 'diagonalUpLeft' | 'diagonalDownRight' | 'diagonalDownLeft';
/** Hand results */ /** Hand results */
export interface HandResult { export interface HandResult {
/** hand id */ /** hand id */
@ -107,19 +132,20 @@ export interface HandResult {
/** detected hand keypoints */ /** detected hand keypoints */
keypoints: Array<Point>, keypoints: Array<Point>,
/** detected hand class */ /** detected hand class */
label: string, label: HandType,
/** detected hand keypoints combined into annotated parts */ /** detected hand keypoints combined into annotated parts */
annotations: Record< annotations: Record<Finger, Array<Point>>,
'index' | 'middle' | 'pinky' | 'ring' | 'thumb' | 'palm',
Array<Point>
>,
/** detected hand parts annotated with part gestures */ /** detected hand parts annotated with part gestures */
landmarks: Record< landmarks: Record<Finger, { curl: FingerCurl, direction: FingerDirection }>,
'index' | 'middle' | 'pinky' | 'ring' | 'thumb',
{ curl: 'none' | 'half' | 'full', direction: 'verticalUp' | 'verticalDown' | 'horizontalLeft' | 'horizontalRight' | 'diagonalUpRight' | 'diagonalUpLeft' | 'diagonalDownRight' | 'diagonalDownLeft' }
>,
} }
export type ObjectType = 'person' | 'bicycle' | 'car' | 'motorcycle' | 'airplane' | 'bus' | 'train' | 'truck' | 'boat' | 'traffic light' | 'fire hydrant' | 'stop sign' | 'parking meter'
| 'bench' | 'bird' | 'cat' | 'dog' | 'horse' | 'sheep' | 'cow' | 'elephant' | 'bear' | 'zebra' | 'giraffe' | 'backpack' | 'umbrella' | 'handbag' | 'tie' | 'suitcase' | 'frisbee'
| 'skis' | 'snowboard' | 'sports ball' | 'kite' | 'baseball bat' | 'baseball glove' | 'skateboard' | 'surfboard' | 'tennis racket' | 'bottle' | 'wine glass' | 'cup' | 'fork'
| 'knife' | 'spoon' | 'bowl' | 'banana' | 'apple' | 'sandwich' | 'orange' | 'broccoli' | 'carrot' | 'hot dog' | 'pizza' | 'donut' | 'cake' | 'chair' | 'couch' | 'potted plant'
| 'bed' | 'dining table' | 'toilet' | 'tv' | 'laptop' | 'mouse' | 'remote' | 'keyboard' | 'cell phone' | 'microwave' | 'oven' | 'toaster' | 'sink' | 'refrigerator' | 'book'
| 'clock' | 'vase' | 'scissors' | 'teddy bear' | 'hair drier' | 'toothbrush';
/** Object results */ /** Object results */
export interface ObjectResult { export interface ObjectResult {
/** object id */ /** object id */
@ -129,7 +155,7 @@ export interface ObjectResult {
/** detected object class id */ /** detected object class id */
class: number, class: number,
/** detected object class name */ /** detected object class name */
label: string, label: ObjectType,
/** detected object box */ /** detected object box */
box: Box, box: Box,
/** detected object box normalized to 0..1 */ /** detected object box normalized to 0..1 */

View File

@ -2,7 +2,7 @@
* Results interpolation for smoothening of video detection results inbetween detected frames * Results interpolation for smoothening of video detection results inbetween detected frames
*/ */
import type { Result, FaceResult, BodyResult, HandResult, ObjectResult, GestureResult, PersonResult, Box, Point } from '../result'; import type { Result, FaceResult, BodyResult, HandResult, ObjectResult, GestureResult, PersonResult, Box, Point, BodyLandmark, BodyAnnotation } from '../result';
import type { Config } from '../config'; import type { Config } from '../config';
import * as moveNetCoords from '../body/movenetcoords'; import * as moveNetCoords from '../body/movenetcoords';
@ -46,7 +46,7 @@ export function calc(newResult: Result, config: Config): Result {
const keypoints = (newResult.body[i].keypoints // update keypoints const keypoints = (newResult.body[i].keypoints // update keypoints
.map((newKpt, j) => ({ .map((newKpt, j) => ({
score: newKpt.score, score: newKpt.score,
part: newKpt.part, part: newKpt.part as BodyLandmark,
position: [ position: [
bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].position[0] || 0) + (newKpt.position[0] || 0)) / bufferedFactor : newKpt.position[0], bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].position[0] || 0) + (newKpt.position[0] || 0)) / bufferedFactor : newKpt.position[0],
bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].position[1] || 0) + (newKpt.position[1] || 0)) / bufferedFactor : newKpt.position[1], bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].position[1] || 0) + (newKpt.position[1] || 0)) / bufferedFactor : newKpt.position[1],
@ -57,9 +57,9 @@ export function calc(newResult: Result, config: Config): Result {
bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].positionRaw[1] || 0) + (newKpt.positionRaw[1] || 0)) / bufferedFactor : newKpt.position[1], bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].positionRaw[1] || 0) + (newKpt.positionRaw[1] || 0)) / bufferedFactor : newKpt.position[1],
bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].positionRaw[2] || 0) + (newKpt.positionRaw[2] || 0)) / bufferedFactor : newKpt.position[2], bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].positionRaw[2] || 0) + (newKpt.positionRaw[2] || 0)) / bufferedFactor : newKpt.position[2],
], ],
}))) as Array<{ score: number, part: string, position: [number, number, number?], positionRaw: [number, number, number?] }>; }))) as Array<{ score: number, part: BodyLandmark, position: [number, number, number?], positionRaw: [number, number, number?] }>;
const annotations: Record<string, Point[][]> = {}; // recreate annotations const annotations: Record<BodyAnnotation, Point[][]> = {} as Record<BodyAnnotation, Point[][]>; // recreate annotations
let coords = { connected: {} }; let coords = { connected: {} };
if (config.body?.modelPath?.includes('efficientpose')) coords = efficientPoseCoords; if (config.body?.modelPath?.includes('efficientpose')) coords = efficientPoseCoords;
else if (config.body?.modelPath?.includes('blazepose')) coords = blazePoseCoords; else if (config.body?.modelPath?.includes('blazepose')) coords = blazePoseCoords;

View File

@ -1,24 +1,24 @@
2021-12-14 15:39:56 INFO:  Application: {"name":"@vladmandic/human","version":"2.5.5"} 2021-12-15 09:25:05 INFO:  Application: {"name":"@vladmandic/human","version":"2.5.5"}
2021-12-14 15:39:56 INFO:  Environment: {"profile":"production","config":".build.json","package":"package.json","tsconfig":true,"eslintrc":true,"git":true} 2021-12-15 09:25:05 INFO:  Environment: {"profile":"production","config":".build.json","package":"package.json","tsconfig":true,"eslintrc":true,"git":true}
2021-12-14 15:39:56 INFO:  Toolchain: {"build":"0.6.6","esbuild":"0.13.15","typescript":"4.5.4","typedoc":"0.22.10","eslint":"8.4.1"} 2021-12-15 09:25:05 INFO:  Toolchain: {"build":"0.6.6","esbuild":"0.13.15","typescript":"4.5.4","typedoc":"0.22.10","eslint":"8.4.1"}
2021-12-14 15:39:56 INFO:  Build: {"profile":"production","steps":["clean","compile","typings","typedoc","lint","changelog"]} 2021-12-15 09:25:05 INFO:  Build: {"profile":"production","steps":["clean","compile","typings","typedoc","lint","changelog"]}
2021-12-14 15:39:56 STATE: Clean: {"locations":["dist/*","types/lib/*","typedoc/*"]} 2021-12-15 09:25:05 STATE: Clean: {"locations":["dist/*","types/lib/*","typedoc/*"]}
2021-12-14 15:39:56 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":102,"outputBytes":1275} 2021-12-15 09:25:05 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":102,"outputBytes":1275}
2021-12-14 15:39:56 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":63,"inputBytes":556501,"outputBytes":464775} 2021-12-15 09:25:06 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":63,"inputBytes":561428,"outputBytes":464499}
2021-12-14 15:39:56 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":1283} 2021-12-15 09:25:06 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":1283}
2021-12-14 15:39:56 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":63,"inputBytes":556509,"outputBytes":464779} 2021-12-15 09:25:06 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":63,"inputBytes":561436,"outputBytes":464503}
2021-12-14 15:39:56 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":149,"outputBytes":1350} 2021-12-15 09:25:06 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":149,"outputBytes":1350}
2021-12-14 15:39:56 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":63,"inputBytes":556576,"outputBytes":464851} 2021-12-15 09:25:06 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":63,"inputBytes":561503,"outputBytes":464575}
2021-12-14 15:39:56 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1063,"outputBytes":1652} 2021-12-15 09:25:06 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1063,"outputBytes":1652}
2021-12-14 15:39:56 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912} 2021-12-15 09:25:06 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
2021-12-14 15:39:57 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":63,"inputBytes":556138,"outputBytes":466537} 2021-12-15 09:25:06 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":63,"inputBytes":561065,"outputBytes":466261}
2021-12-14 15:39:57 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":2516283} 2021-12-15 09:25:06 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":2515619}
2021-12-14 15:39:57 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":63,"inputBytes":3071509,"outputBytes":1632465} 2021-12-15 09:25:06 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":63,"inputBytes":3075772,"outputBytes":1631838}
2021-12-14 15:39:57 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":63,"inputBytes":3071509,"outputBytes":2989671} 2021-12-15 09:25:06 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":63,"inputBytes":3075772,"outputBytes":2988731}
2021-12-14 15:40:13 STATE: Typings: {"input":"src/human.ts","output":"types/lib","files":110} 2021-12-15 09:25:18 STATE: Typings: {"input":"src/human.ts","output":"types/lib","files":110}
2021-12-14 15:40:22 STATE: TypeDoc: {"input":"src/human.ts","output":"typedoc","objects":52,"generated":true} 2021-12-15 09:25:22 STATE: TypeDoc: {"input":"src/human.ts","output":"typedoc","objects":69,"generated":true}
2021-12-14 15:40:22 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5864,"outputBytes":4127} 2021-12-15 09:25:22 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5864,"outputBytes":4127}
2021-12-14 15:40:22 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15174,"outputBytes":11794} 2021-12-15 09:25:22 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15174,"outputBytes":11794}
2021-12-14 15:41:22 STATE: Lint: {"locations":["*.json","src/**/*.ts","test/**/*.js","demo/**/*.js"],"files":93,"errors":0,"warnings":0} 2021-12-15 09:25:46 STATE: Lint: {"locations":["*.json","src/**/*.ts","test/**/*.js","demo/**/*.js"],"files":93,"errors":0,"warnings":0}
2021-12-14 15:41:22 STATE: ChangeLog: {"repository":"https://github.com/vladmandic/human","branch":"main","output":"CHANGELOG.md"} 2021-12-15 09:25:46 STATE: ChangeLog: {"repository":"https://github.com/vladmandic/human","branch":"main","output":"CHANGELOG.md"}
2021-12-14 15:41:22 INFO:  Done... 2021-12-15 09:25:46 INFO:  Done...

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,11 +1,11 @@
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>BodyKeypoint | @vladmandic/human - v2.5.5</title><meta name="description" content="Documentation for @vladmandic/human - v2.5.5"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@vladmandic/human - v2.5.5</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../index.html">@vladmandic/human - v2.5.5</a></li><li><a href="BodyKeypoint.html">BodyKeypoint</a></li></ul><h1>Interface BodyKeypoint</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><div class="lead"> <!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>BodyKeypoint | @vladmandic/human - v2.5.5</title><meta name="description" content="Documentation for @vladmandic/human - v2.5.5"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@vladmandic/human - v2.5.5</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../index.html">@vladmandic/human - v2.5.5</a></li><li><a href="BodyKeypoint.html">BodyKeypoint</a></li></ul><h1>Interface BodyKeypoint</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><div class="lead">
<p>Body Result keypoints</p> <p>Body Result keypoints</p>
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">BodyKeypoint</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyKeypoint.html#part" class="tsd-kind-icon">part</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyKeypoint.html#position" class="tsd-kind-icon">position</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyKeypoint.html#positionRaw" class="tsd-kind-icon">position<wbr/>Raw</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyKeypoint.html#score" class="tsd-kind-icon">score</a></li></ul></section></div></section></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 id="part" class="tsd-anchor"></a><h3>part</h3><div class="tsd-signature tsd-kind-icon">part<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L68">src/result.ts:68</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">BodyKeypoint</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyKeypoint.html#part" class="tsd-kind-icon">part</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyKeypoint.html#position" class="tsd-kind-icon">position</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyKeypoint.html#positionRaw" class="tsd-kind-icon">position<wbr/>Raw</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyKeypoint.html#score" class="tsd-kind-icon">score</a></li></ul></section></div></section></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 id="part" class="tsd-anchor"></a><h3>part</h3><div class="tsd-signature tsd-kind-icon">part<span class="tsd-signature-symbol">:</span> <a href="../index.html#BodyLandmark" class="tsd-signature-type" data-tsd-kind="Type alias">BodyLandmark</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L88">src/result.ts:88</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>body part name</p> <p>body part name</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="position" class="tsd-anchor"></a><h3>position</h3><div class="tsd-signature tsd-kind-icon">position<span class="tsd-signature-symbol">:</span> <a href="../index.html#Point" class="tsd-signature-type" data-tsd-kind="Type alias">Point</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L70">src/result.ts:70</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="position" class="tsd-anchor"></a><h3>position</h3><div class="tsd-signature tsd-kind-icon">position<span class="tsd-signature-symbol">:</span> <a href="../index.html#Point" class="tsd-signature-type" data-tsd-kind="Type alias">Point</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L90">src/result.ts:90</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>body part position</p> <p>body part position</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="positionRaw" class="tsd-anchor"></a><h3>position<wbr/>Raw</h3><div class="tsd-signature tsd-kind-icon">position<wbr/>Raw<span class="tsd-signature-symbol">:</span> <a href="../index.html#Point" class="tsd-signature-type" data-tsd-kind="Type alias">Point</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L72">src/result.ts:72</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="positionRaw" class="tsd-anchor"></a><h3>position<wbr/>Raw</h3><div class="tsd-signature tsd-kind-icon">position<wbr/>Raw<span class="tsd-signature-symbol">:</span> <a href="../index.html#Point" class="tsd-signature-type" data-tsd-kind="Type alias">Point</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L92">src/result.ts:92</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>body part position normalized to 0..1</p> <p>body part position normalized to 0..1</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="score" class="tsd-anchor"></a><h3>score</h3><div class="tsd-signature tsd-kind-icon">score<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L74">src/result.ts:74</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="score" class="tsd-anchor"></a><h3>score</h3><div class="tsd-signature tsd-kind-icon">score<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L94">src/result.ts:94</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>body part detection score</p> <p>body part detection score</p>
</div></div></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../index.html">Exports</a></li><li class=" tsd-kind-namespace"><a href="../modules/Tensor.html">Tensor</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-interface"><a href="BodyKeypoint.html" class="tsd-kind-icon">Body<wbr/>Keypoint</a><ul><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyKeypoint.html#part" class="tsd-kind-icon">part</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyKeypoint.html#position" class="tsd-kind-icon">position</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyKeypoint.html#positionRaw" class="tsd-kind-icon">position<wbr/>Raw</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyKeypoint.html#score" class="tsd-kind-icon">score</a></li></ul></li></ul></nav></div></div></div><footer class=""><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="overlay"></div><script src="../assets/main.js"></script></body></html> </div></div></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../index.html">Exports</a></li><li class=" tsd-kind-namespace"><a href="../modules/Tensor.html">Tensor</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-interface"><a href="BodyKeypoint.html" class="tsd-kind-icon">Body<wbr/>Keypoint</a><ul><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyKeypoint.html#part" class="tsd-kind-icon">part</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyKeypoint.html#position" class="tsd-kind-icon">position</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyKeypoint.html#positionRaw" class="tsd-kind-icon">position<wbr/>Raw</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyKeypoint.html#score" class="tsd-kind-icon">score</a></li></ul></li></ul></nav></div></div></div><footer class=""><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="overlay"></div><script src="../assets/main.js"></script></body></html>

View File

@ -1,15 +1,15 @@
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>BodyResult | @vladmandic/human - v2.5.5</title><meta name="description" content="Documentation for @vladmandic/human - v2.5.5"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@vladmandic/human - v2.5.5</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../index.html">@vladmandic/human - v2.5.5</a></li><li><a href="BodyResult.html">BodyResult</a></li></ul><h1>Interface BodyResult</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><div class="lead"> <!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>BodyResult | @vladmandic/human - v2.5.5</title><meta name="description" content="Documentation for @vladmandic/human - v2.5.5"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@vladmandic/human - v2.5.5</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../index.html">@vladmandic/human - v2.5.5</a></li><li><a href="BodyResult.html">BodyResult</a></li></ul><h1>Interface BodyResult</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><div class="lead">
<p>Body results</p> <p>Body results</p>
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">BodyResult</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyResult.html#annotations" class="tsd-kind-icon">annotations</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyResult.html#box" class="tsd-kind-icon">box</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyResult.html#boxRaw" class="tsd-kind-icon">box<wbr/>Raw</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyResult.html#id" class="tsd-kind-icon">id</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyResult.html#keypoints" class="tsd-kind-icon">keypoints</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyResult.html#score" class="tsd-kind-icon">score</a></li></ul></section></div></section></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 id="annotations" class="tsd-anchor"></a><h3>annotations</h3><div class="tsd-signature tsd-kind-icon">annotations<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><a href="../index.html#Point" class="tsd-signature-type" data-tsd-kind="Type alias">Point</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L90">src/result.ts:90</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">BodyResult</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyResult.html#annotations" class="tsd-kind-icon">annotations</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyResult.html#box" class="tsd-kind-icon">box</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyResult.html#boxRaw" class="tsd-kind-icon">box<wbr/>Raw</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyResult.html#id" class="tsd-kind-icon">id</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyResult.html#keypoints" class="tsd-kind-icon">keypoints</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyResult.html#score" class="tsd-kind-icon">score</a></li></ul></section></div></section></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 id="annotations" class="tsd-anchor"></a><h3>annotations</h3><div class="tsd-signature tsd-kind-icon">annotations<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol">&lt;</span><a href="../index.html#BodyAnnotation" class="tsd-signature-type" data-tsd-kind="Type alias">BodyAnnotation</a><span class="tsd-signature-symbol">, </span><a href="../index.html#Point" class="tsd-signature-type" data-tsd-kind="Type alias">Point</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L110">src/result.ts:110</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>detected body keypoints combined into annotated parts</p> <p>detected body keypoints combined into annotated parts</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="box" class="tsd-anchor"></a><h3>box</h3><div class="tsd-signature tsd-kind-icon">box<span class="tsd-signature-symbol">:</span> <a href="../index.html#Box" class="tsd-signature-type" data-tsd-kind="Type alias">Box</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L84">src/result.ts:84</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="box" class="tsd-anchor"></a><h3>box</h3><div class="tsd-signature tsd-kind-icon">box<span class="tsd-signature-symbol">:</span> <a href="../index.html#Box" class="tsd-signature-type" data-tsd-kind="Type alias">Box</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L104">src/result.ts:104</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>detected body box</p> <p>detected body box</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="boxRaw" class="tsd-anchor"></a><h3>box<wbr/>Raw</h3><div class="tsd-signature tsd-kind-icon">box<wbr/>Raw<span class="tsd-signature-symbol">:</span> <a href="../index.html#Box" class="tsd-signature-type" data-tsd-kind="Type alias">Box</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L86">src/result.ts:86</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="boxRaw" class="tsd-anchor"></a><h3>box<wbr/>Raw</h3><div class="tsd-signature tsd-kind-icon">box<wbr/>Raw<span class="tsd-signature-symbol">:</span> <a href="../index.html#Box" class="tsd-signature-type" data-tsd-kind="Type alias">Box</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L106">src/result.ts:106</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>detected body box normalized to 0..1</p> <p>detected body box normalized to 0..1</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="id" class="tsd-anchor"></a><h3>id</h3><div class="tsd-signature tsd-kind-icon">id<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L80">src/result.ts:80</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="id" class="tsd-anchor"></a><h3>id</h3><div class="tsd-signature tsd-kind-icon">id<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L100">src/result.ts:100</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>body id</p> <p>body id</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="keypoints" class="tsd-anchor"></a><h3>keypoints</h3><div class="tsd-signature tsd-kind-icon">keypoints<span class="tsd-signature-symbol">:</span> <a href="BodyKeypoint.html" class="tsd-signature-type" data-tsd-kind="Interface">BodyKeypoint</a><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L88">src/result.ts:88</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="keypoints" class="tsd-anchor"></a><h3>keypoints</h3><div class="tsd-signature tsd-kind-icon">keypoints<span class="tsd-signature-symbol">:</span> <a href="BodyKeypoint.html" class="tsd-signature-type" data-tsd-kind="Interface">BodyKeypoint</a><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L108">src/result.ts:108</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>detected body keypoints</p> <p>detected body keypoints</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="score" class="tsd-anchor"></a><h3>score</h3><div class="tsd-signature tsd-kind-icon">score<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L82">src/result.ts:82</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="score" class="tsd-anchor"></a><h3>score</h3><div class="tsd-signature tsd-kind-icon">score<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L102">src/result.ts:102</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>body detection score</p> <p>body detection score</p>
</div></div></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../index.html">Exports</a></li><li class=" tsd-kind-namespace"><a href="../modules/Tensor.html">Tensor</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-interface"><a href="BodyResult.html" class="tsd-kind-icon">Body<wbr/>Result</a><ul><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyResult.html#annotations" class="tsd-kind-icon">annotations</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyResult.html#box" class="tsd-kind-icon">box</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyResult.html#boxRaw" class="tsd-kind-icon">box<wbr/>Raw</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyResult.html#id" class="tsd-kind-icon">id</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyResult.html#keypoints" class="tsd-kind-icon">keypoints</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyResult.html#score" class="tsd-kind-icon">score</a></li></ul></li></ul></nav></div></div></div><footer class=""><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="overlay"></div><script src="../assets/main.js"></script></body></html> </div></div></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../index.html">Exports</a></li><li class=" tsd-kind-namespace"><a href="../modules/Tensor.html">Tensor</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-interface"><a href="BodyResult.html" class="tsd-kind-icon">Body<wbr/>Result</a><ul><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyResult.html#annotations" class="tsd-kind-icon">annotations</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyResult.html#box" class="tsd-kind-icon">box</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyResult.html#boxRaw" class="tsd-kind-icon">box<wbr/>Raw</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyResult.html#id" class="tsd-kind-icon">id</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyResult.html#keypoints" class="tsd-kind-icon">keypoints</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BodyResult.html#score" class="tsd-kind-icon">score</a></li></ul></li></ul></nav></div></div></div><footer class=""><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="overlay"></div><script src="../assets/main.js"></script></body></html>

View File

@ -13,39 +13,39 @@ valid build-in backends are:</p>
<li>NodeJS: <code>cpu</code>, <code>wasm</code>, <code>tensorflow</code> <li>NodeJS: <code>cpu</code>, <code>wasm</code>, <code>tensorflow</code>
default: <code>humangl</code> for browser and <code>tensorflow</code> for nodejs</li> default: <code>humangl</code> for browser and <code>tensorflow</code> for nodejs</li>
</ul> </ul>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="body" class="tsd-anchor"></a><h3>body</h3><div class="tsd-signature tsd-kind-icon">body<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol">&lt;</span><a href="BodyConfig.html" class="tsd-signature-type" data-tsd-kind="Interface">BodyConfig</a><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L277">src/config.ts:277</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="body" class="tsd-anchor"></a><h3>body</h3><div class="tsd-signature tsd-kind-icon">body<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol">&lt;</span><a href="BodyConfig.html" class="tsd-signature-type" data-tsd-kind="Interface">BodyConfig</a><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L276">src/config.ts:276</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Body config <a href="BodyConfig.html">BodyConfig</a></p> <p>Body config <a href="BodyConfig.html">BodyConfig</a></p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="cacheSensitivity" class="tsd-anchor"></a><h3>cache<wbr/>Sensitivity</h3><div class="tsd-signature tsd-kind-icon">cache<wbr/>Sensitivity<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L259">src/config.ts:259</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="cacheSensitivity" class="tsd-anchor"></a><h3>cache<wbr/>Sensitivity</h3><div class="tsd-signature tsd-kind-icon">cache<wbr/>Sensitivity<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L258">src/config.ts:258</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Cache sensitivity</p> <p>Cache sensitivity</p>
<ul> <ul>
<li>values 0..1 where 0.01 means reset cache if input changed more than 1%</li> <li>values 0..1 where 0.01 means reset cache if input changed more than 1%</li>
<li>set to 0 to disable caching</li> <li>set to 0 to disable caching</li>
</ul> </ul>
</div><div><p>default: 0.7</p> </div><div><p>default: 0.7</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="deallocate" class="tsd-anchor"></a><h3>deallocate</h3><div class="tsd-signature tsd-kind-icon">deallocate<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L262">src/config.ts:262</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="deallocate" class="tsd-anchor"></a><h3>deallocate</h3><div class="tsd-signature tsd-kind-icon">deallocate<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L261">src/config.ts:261</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Perform immediate garbage collection on deallocated tensors instead of caching them</p> <p>Perform immediate garbage collection on deallocated tensors instead of caching them</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="debug" class="tsd-anchor"></a><h3>debug</h3><div class="tsd-signature tsd-kind-icon">debug<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L229">src/config.ts:229</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="debug" class="tsd-anchor"></a><h3>debug</h3><div class="tsd-signature tsd-kind-icon">debug<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L229">src/config.ts:229</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Print debug statements to console</p> <p>Print debug statements to console</p>
</div><div><p>default: <code>true</code></p> </div><div><p>default: <code>true</code></p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="face" class="tsd-anchor"></a><h3>face</h3><div class="tsd-signature tsd-kind-icon">face<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol">&lt;</span><a href="FaceConfig.html" class="tsd-signature-type" data-tsd-kind="Interface">FaceConfig</a><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L274">src/config.ts:274</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="face" class="tsd-anchor"></a><h3>face</h3><div class="tsd-signature tsd-kind-icon">face<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol">&lt;</span><a href="FaceConfig.html" class="tsd-signature-type" data-tsd-kind="Interface">FaceConfig</a><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L273">src/config.ts:273</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Face config <a href="FaceConfig.html">FaceConfig</a></p> <p>Face config <a href="FaceConfig.html">FaceConfig</a></p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="filter" class="tsd-anchor"></a><h3>filter</h3><div class="tsd-signature tsd-kind-icon">filter<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol">&lt;</span><a href="FilterConfig.html" class="tsd-signature-type" data-tsd-kind="Interface">FilterConfig</a><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L268">src/config.ts:268</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="filter" class="tsd-anchor"></a><h3>filter</h3><div class="tsd-signature tsd-kind-icon">filter<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol">&lt;</span><a href="FilterConfig.html" class="tsd-signature-type" data-tsd-kind="Interface">FilterConfig</a><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L267">src/config.ts:267</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Filter config <a href="FilterConfig.html">FilterConfig</a></p> <p>Filter config <a href="FilterConfig.html">FilterConfig</a></p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="gesture" class="tsd-anchor"></a><h3>gesture</h3><div class="tsd-signature tsd-kind-icon">gesture<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol">&lt;</span><a href="GestureConfig.html" class="tsd-signature-type" data-tsd-kind="Interface">GestureConfig</a><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L271">src/config.ts:271</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="gesture" class="tsd-anchor"></a><h3>gesture</h3><div class="tsd-signature tsd-kind-icon">gesture<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol">&lt;</span><a href="GestureConfig.html" class="tsd-signature-type" data-tsd-kind="Interface">GestureConfig</a><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L270">src/config.ts:270</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Gesture config <a href="GestureConfig.html">GestureConfig</a></p> <p>Gesture config <a href="GestureConfig.html">GestureConfig</a></p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="hand" class="tsd-anchor"></a><h3>hand</h3><div class="tsd-signature tsd-kind-icon">hand<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol">&lt;</span><a href="HandConfig.html" class="tsd-signature-type" data-tsd-kind="Interface">HandConfig</a><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L280">src/config.ts:280</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="hand" class="tsd-anchor"></a><h3>hand</h3><div class="tsd-signature tsd-kind-icon">hand<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol">&lt;</span><a href="HandConfig.html" class="tsd-signature-type" data-tsd-kind="Interface">HandConfig</a><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L279">src/config.ts:279</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Hand config <a href="HandConfig.html">HandConfig</a></p> <p>Hand config <a href="HandConfig.html">HandConfig</a></p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="modelBasePath" class="tsd-anchor"></a><h3>model<wbr/>Base<wbr/>Path</h3><div class="tsd-signature tsd-kind-icon">model<wbr/>Base<wbr/>Path<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L251">src/config.ts:251</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="modelBasePath" class="tsd-anchor"></a><h3>model<wbr/>Base<wbr/>Path</h3><div class="tsd-signature tsd-kind-icon">model<wbr/>Base<wbr/>Path<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L250">src/config.ts:250</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Base model path (typically starting with file://, http:// or https://) for all models</p> <p>Base model path (typically starting with file://, http:// or https://) for all models</p>
<ul> <ul>
<li>individual modelPath values are relative to this path</li> <li>individual modelPath values are relative to this path</li>
</ul> </ul>
</div><div><p>default: <code>../models/</code> for browsers and <code>file://models/</code> for nodejs</p> </div><div><p>default: <code>../models/</code> for browsers and <code>file://models/</code> for nodejs</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="object" class="tsd-anchor"></a><h3>object</h3><div class="tsd-signature tsd-kind-icon">object<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol">&lt;</span><a href="ObjectConfig.html" class="tsd-signature-type" data-tsd-kind="Interface">ObjectConfig</a><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L283">src/config.ts:283</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="object" class="tsd-anchor"></a><h3>object</h3><div class="tsd-signature tsd-kind-icon">object<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol">&lt;</span><a href="ObjectConfig.html" class="tsd-signature-type" data-tsd-kind="Interface">ObjectConfig</a><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L282">src/config.ts:282</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Object config <a href="ObjectConfig.html">ObjectConfig</a></p> <p>Object config <a href="ObjectConfig.html">ObjectConfig</a></p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="segmentation" class="tsd-anchor"></a><h3>segmentation</h3><div class="tsd-signature tsd-kind-icon">segmentation<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol">&lt;</span><a href="SegmentationConfig.html" class="tsd-signature-type" data-tsd-kind="Interface">SegmentationConfig</a><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L286">src/config.ts:286</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="segmentation" class="tsd-anchor"></a><h3>segmentation</h3><div class="tsd-signature tsd-kind-icon">segmentation<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol">&lt;</span><a href="SegmentationConfig.html" class="tsd-signature-type" data-tsd-kind="Interface">SegmentationConfig</a><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L285">src/config.ts:285</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Segmentation config <a href="SegmentationConfig.html">SegmentationConfig</a></p> <p>Segmentation config <a href="SegmentationConfig.html">SegmentationConfig</a></p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="skipAllowed" class="tsd-anchor"></a><h3>skip<wbr/>Allowed</h3><div class="tsd-signature tsd-kind-icon">skip<wbr/>Allowed<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L265">src/config.ts:265</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="skipAllowed" class="tsd-anchor"></a><h3>skip<wbr/>Allowed</h3><div class="tsd-signature tsd-kind-icon">skip<wbr/>Allowed<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L264">src/config.ts:264</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Internal Variable</p> <p>Internal Variable</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="warmup" class="tsd-anchor"></a><h3>warmup</h3><div class="tsd-signature tsd-kind-icon">warmup<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;face&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;body&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;none&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;full&quot;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L243">src/config.ts:243</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="warmup" class="tsd-anchor"></a><h3>warmup</h3><div class="tsd-signature tsd-kind-icon">warmup<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;face&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;body&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;none&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;full&quot;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/config.ts#L243">src/config.ts:243</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>What to use for <code>human.warmup()</code></p> <p>What to use for <code>human.warmup()</code></p>

View File

@ -4,44 +4,44 @@
<li>Combined results of face detector, face mesh, age, gender, emotion, embedding, iris models</li> <li>Combined results of face detector, face mesh, age, gender, emotion, embedding, iris models</li>
<li>Some values may be null if specific model is not enabled</li> <li>Some values may be null if specific model is not enabled</li>
</ul> </ul>
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">FaceResult</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#age" class="tsd-kind-icon">age</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#annotations" class="tsd-kind-icon">annotations</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#box" class="tsd-kind-icon">box</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#boxRaw" class="tsd-kind-icon">box<wbr/>Raw</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#boxScore" class="tsd-kind-icon">box<wbr/>Score</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#embedding" class="tsd-kind-icon">embedding</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#emotion" class="tsd-kind-icon">emotion</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#faceScore" class="tsd-kind-icon">face<wbr/>Score</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#gender" class="tsd-kind-icon">gender</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#genderScore" class="tsd-kind-icon">gender<wbr/>Score</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#id" class="tsd-kind-icon">id</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#iris" class="tsd-kind-icon">iris</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#live" class="tsd-kind-icon">live</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#mesh" class="tsd-kind-icon">mesh</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#meshRaw" class="tsd-kind-icon">mesh<wbr/>Raw</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#race" class="tsd-kind-icon">race</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#real" class="tsd-kind-icon">real</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#rotation" class="tsd-kind-icon">rotation</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#score" class="tsd-kind-icon">score</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#tensor" class="tsd-kind-icon">tensor</a></li></ul></section></div></section></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 id="age" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagOptional">Optional</span> age</h3><div class="tsd-signature tsd-kind-icon">age<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L38">src/result.ts:38</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">FaceResult</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#age" class="tsd-kind-icon">age</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#annotations" class="tsd-kind-icon">annotations</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#box" class="tsd-kind-icon">box</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#boxRaw" class="tsd-kind-icon">box<wbr/>Raw</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#boxScore" class="tsd-kind-icon">box<wbr/>Score</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#embedding" class="tsd-kind-icon">embedding</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#emotion" class="tsd-kind-icon">emotion</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#faceScore" class="tsd-kind-icon">face<wbr/>Score</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#gender" class="tsd-kind-icon">gender</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#genderScore" class="tsd-kind-icon">gender<wbr/>Score</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#id" class="tsd-kind-icon">id</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#iris" class="tsd-kind-icon">iris</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#live" class="tsd-kind-icon">live</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#mesh" class="tsd-kind-icon">mesh</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#meshRaw" class="tsd-kind-icon">mesh<wbr/>Raw</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#race" class="tsd-kind-icon">race</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#real" class="tsd-kind-icon">real</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#rotation" class="tsd-kind-icon">rotation</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#score" class="tsd-kind-icon">score</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#tensor" class="tsd-kind-icon">tensor</a></li></ul></section></div></section></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 id="age" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagOptional">Optional</span> age</h3><div class="tsd-signature tsd-kind-icon">age<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L47">src/result.ts:47</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>detected age</p> <p>detected age</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="annotations" class="tsd-anchor"></a><h3>annotations</h3><div class="tsd-signature tsd-kind-icon">annotations<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><a href="../index.html#Point" class="tsd-signature-type" data-tsd-kind="Type alias">Point</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L36">src/result.ts:36</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="annotations" class="tsd-anchor"></a><h3>annotations</h3><div class="tsd-signature tsd-kind-icon">annotations<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol">&lt;</span><a href="../index.html#FaceLandmark" class="tsd-signature-type" data-tsd-kind="Type alias">FaceLandmark</a><span class="tsd-signature-symbol">, </span><a href="../index.html#Point" class="tsd-signature-type" data-tsd-kind="Type alias">Point</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L45">src/result.ts:45</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>mesh keypoints combined into annotated results</p> <p>mesh keypoints combined into annotated results</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="box" class="tsd-anchor"></a><h3>box</h3><div class="tsd-signature tsd-kind-icon">box<span class="tsd-signature-symbol">:</span> <a href="../index.html#Box" class="tsd-signature-type" data-tsd-kind="Type alias">Box</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L28">src/result.ts:28</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="box" class="tsd-anchor"></a><h3>box</h3><div class="tsd-signature tsd-kind-icon">box<span class="tsd-signature-symbol">:</span> <a href="../index.html#Box" class="tsd-signature-type" data-tsd-kind="Type alias">Box</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L37">src/result.ts:37</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>detected face box</p> <p>detected face box</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="boxRaw" class="tsd-anchor"></a><h3>box<wbr/>Raw</h3><div class="tsd-signature tsd-kind-icon">box<wbr/>Raw<span class="tsd-signature-symbol">:</span> <a href="../index.html#Box" class="tsd-signature-type" data-tsd-kind="Type alias">Box</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L30">src/result.ts:30</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="boxRaw" class="tsd-anchor"></a><h3>box<wbr/>Raw</h3><div class="tsd-signature tsd-kind-icon">box<wbr/>Raw<span class="tsd-signature-symbol">:</span> <a href="../index.html#Box" class="tsd-signature-type" data-tsd-kind="Type alias">Box</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L39">src/result.ts:39</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>detected face box normalized to 0..1</p> <p>detected face box normalized to 0..1</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="boxScore" class="tsd-anchor"></a><h3>box<wbr/>Score</h3><div class="tsd-signature tsd-kind-icon">box<wbr/>Score<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L24">src/result.ts:24</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="boxScore" class="tsd-anchor"></a><h3>box<wbr/>Score</h3><div class="tsd-signature tsd-kind-icon">box<wbr/>Score<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L33">src/result.ts:33</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>detection score</p> <p>detection score</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="embedding" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagOptional">Optional</span> embedding</h3><div class="tsd-signature tsd-kind-icon">embedding<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L48">src/result.ts:48</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="embedding" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagOptional">Optional</span> embedding</h3><div class="tsd-signature tsd-kind-icon">embedding<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L57">src/result.ts:57</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>face descriptor</p> <p>face descriptor</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="emotion" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagOptional">Optional</span> emotion</h3><div class="tsd-signature tsd-kind-icon">emotion<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">{ </span>emotion<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>score<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L44">src/result.ts:44</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="emotion" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagOptional">Optional</span> emotion</h3><div class="tsd-signature tsd-kind-icon">emotion<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">{ </span>emotion<span class="tsd-signature-symbol">: </span><a href="../index.html#Emotion" class="tsd-signature-type" data-tsd-kind="Type alias">Emotion</a><span class="tsd-signature-symbol">; </span>score<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L53">src/result.ts:53</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>detected emotions</p> <p>detected emotions</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="faceScore" class="tsd-anchor"></a><h3>face<wbr/>Score</h3><div class="tsd-signature tsd-kind-icon">face<wbr/>Score<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L26">src/result.ts:26</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="faceScore" class="tsd-anchor"></a><h3>face<wbr/>Score</h3><div class="tsd-signature tsd-kind-icon">face<wbr/>Score<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L35">src/result.ts:35</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>mesh score</p> <p>mesh score</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="gender" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagOptional">Optional</span> gender</h3><div class="tsd-signature tsd-kind-icon">gender<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L40">src/result.ts:40</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="gender" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagOptional">Optional</span> gender</h3><div class="tsd-signature tsd-kind-icon">gender<span class="tsd-signature-symbol">?:</span> <a href="../index.html#Gender" class="tsd-signature-type" data-tsd-kind="Type alias">Gender</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L49">src/result.ts:49</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>detected gender</p> <p>detected gender</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="genderScore" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagOptional">Optional</span> gender<wbr/>Score</h3><div class="tsd-signature tsd-kind-icon">gender<wbr/>Score<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L42">src/result.ts:42</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="genderScore" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagOptional">Optional</span> gender<wbr/>Score</h3><div class="tsd-signature tsd-kind-icon">gender<wbr/>Score<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L51">src/result.ts:51</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>gender detection score</p> <p>gender detection score</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="id" class="tsd-anchor"></a><h3>id</h3><div class="tsd-signature tsd-kind-icon">id<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L20">src/result.ts:20</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="id" class="tsd-anchor"></a><h3>id</h3><div class="tsd-signature tsd-kind-icon">id<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L29">src/result.ts:29</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>face id</p> <p>face id</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="iris" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagOptional">Optional</span> iris</h3><div class="tsd-signature tsd-kind-icon">iris<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L50">src/result.ts:50</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="iris" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagOptional">Optional</span> iris</h3><div class="tsd-signature tsd-kind-icon">iris<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L59">src/result.ts:59</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>face iris distance from camera</p> <p>face iris distance from camera</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="live" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagOptional">Optional</span> live</h3><div class="tsd-signature tsd-kind-icon">live<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L54">src/result.ts:54</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="live" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagOptional">Optional</span> live</h3><div class="tsd-signature tsd-kind-icon">live<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L63">src/result.ts:63</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>face liveness result confidence</p> <p>face liveness result confidence</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="mesh" class="tsd-anchor"></a><h3>mesh</h3><div class="tsd-signature tsd-kind-icon">mesh<span class="tsd-signature-symbol">:</span> <a href="../index.html#Point" class="tsd-signature-type" data-tsd-kind="Type alias">Point</a><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L32">src/result.ts:32</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="mesh" class="tsd-anchor"></a><h3>mesh</h3><div class="tsd-signature tsd-kind-icon">mesh<span class="tsd-signature-symbol">:</span> <a href="../index.html#Point" class="tsd-signature-type" data-tsd-kind="Type alias">Point</a><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L41">src/result.ts:41</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>detected face mesh</p> <p>detected face mesh</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="meshRaw" class="tsd-anchor"></a><h3>mesh<wbr/>Raw</h3><div class="tsd-signature tsd-kind-icon">mesh<wbr/>Raw<span class="tsd-signature-symbol">:</span> <a href="../index.html#Point" class="tsd-signature-type" data-tsd-kind="Type alias">Point</a><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L34">src/result.ts:34</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="meshRaw" class="tsd-anchor"></a><h3>mesh<wbr/>Raw</h3><div class="tsd-signature tsd-kind-icon">mesh<wbr/>Raw<span class="tsd-signature-symbol">:</span> <a href="../index.html#Point" class="tsd-signature-type" data-tsd-kind="Type alias">Point</a><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L43">src/result.ts:43</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>detected face mesh normalized to 0..1</p> <p>detected face mesh normalized to 0..1</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="race" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagOptional">Optional</span> race</h3><div class="tsd-signature tsd-kind-icon">race<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">{ </span>race<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>score<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L46">src/result.ts:46</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="race" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagOptional">Optional</span> race</h3><div class="tsd-signature tsd-kind-icon">race<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">{ </span>race<span class="tsd-signature-symbol">: </span><a href="../index.html#Race" class="tsd-signature-type" data-tsd-kind="Type alias">Race</a><span class="tsd-signature-symbol">; </span>score<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L55">src/result.ts:55</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>detected race</p> <p>detected race</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="real" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagOptional">Optional</span> real</h3><div class="tsd-signature tsd-kind-icon">real<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L52">src/result.ts:52</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="real" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagOptional">Optional</span> real</h3><div class="tsd-signature tsd-kind-icon">real<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L61">src/result.ts:61</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>face anti-spoofing result confidence</p> <p>face anti-spoofing result confidence</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="rotation" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagOptional">Optional</span> rotation</h3><div class="tsd-signature tsd-kind-icon">rotation<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">{ </span>angle<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span>pitch<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span>roll<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span>yaw<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">; </span>gaze<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span>bearing<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span>strength<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">; </span>matrix<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol"> }</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L56">src/result.ts:56</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="rotation" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagOptional">Optional</span> rotation</h3><div class="tsd-signature tsd-kind-icon">rotation<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">{ </span>angle<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span>pitch<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span>roll<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span>yaw<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">; </span>gaze<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span>bearing<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span>strength<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">; </span>matrix<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol"> }</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L65">src/result.ts:65</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>face rotation details</p> <p>face rotation details</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="score" class="tsd-anchor"></a><h3>score</h3><div class="tsd-signature tsd-kind-icon">score<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L22">src/result.ts:22</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="score" class="tsd-anchor"></a><h3>score</h3><div class="tsd-signature tsd-kind-icon">score<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L31">src/result.ts:31</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>overall face score</p> <p>overall face score</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="tensor" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagOptional">Optional</span> tensor</h3><div class="tsd-signature tsd-kind-icon">tensor<span class="tsd-signature-symbol">?:</span> <a href="../classes/Tensor.html" class="tsd-signature-type" data-tsd-kind="Class">Tensor</a><span class="tsd-signature-symbol">&lt;</span><a href="../enums/Rank.html" class="tsd-signature-type" data-tsd-kind="Enumeration">Rank</a><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L62">src/result.ts:62</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="tensor" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagOptional">Optional</span> tensor</h3><div class="tsd-signature tsd-kind-icon">tensor<span class="tsd-signature-symbol">?:</span> <a href="../classes/Tensor.html" class="tsd-signature-type" data-tsd-kind="Class">Tensor</a><span class="tsd-signature-symbol">&lt;</span><a href="../enums/Rank.html" class="tsd-signature-type" data-tsd-kind="Enumeration">Rank</a><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L71">src/result.ts:71</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>detected face as tensor that can be used in further pipelines</p> <p>detected face as tensor that can be used in further pipelines</p>
</div></div></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../index.html">Exports</a></li><li class=" tsd-kind-namespace"><a href="../modules/Tensor.html">Tensor</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-interface"><a href="FaceResult.html" class="tsd-kind-icon">Face<wbr/>Result</a><ul><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#age" class="tsd-kind-icon">age</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#annotations" class="tsd-kind-icon">annotations</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#box" class="tsd-kind-icon">box</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#boxRaw" class="tsd-kind-icon">box<wbr/>Raw</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#boxScore" class="tsd-kind-icon">box<wbr/>Score</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#embedding" class="tsd-kind-icon">embedding</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#emotion" class="tsd-kind-icon">emotion</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#faceScore" class="tsd-kind-icon">face<wbr/>Score</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#gender" class="tsd-kind-icon">gender</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#genderScore" class="tsd-kind-icon">gender<wbr/>Score</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#id" class="tsd-kind-icon">id</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#iris" class="tsd-kind-icon">iris</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#live" class="tsd-kind-icon">live</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#mesh" class="tsd-kind-icon">mesh</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#meshRaw" class="tsd-kind-icon">mesh<wbr/>Raw</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#race" class="tsd-kind-icon">race</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#real" class="tsd-kind-icon">real</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#rotation" class="tsd-kind-icon">rotation</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#score" class="tsd-kind-icon">score</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#tensor" class="tsd-kind-icon">tensor</a></li></ul></li></ul></nav></div></div></div><footer class=""><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="overlay"></div><script src="../assets/main.js"></script></body></html> </div></div></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../index.html">Exports</a></li><li class=" tsd-kind-namespace"><a href="../modules/Tensor.html">Tensor</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-interface"><a href="FaceResult.html" class="tsd-kind-icon">Face<wbr/>Result</a><ul><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#age" class="tsd-kind-icon">age</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#annotations" class="tsd-kind-icon">annotations</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#box" class="tsd-kind-icon">box</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#boxRaw" class="tsd-kind-icon">box<wbr/>Raw</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#boxScore" class="tsd-kind-icon">box<wbr/>Score</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#embedding" class="tsd-kind-icon">embedding</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#emotion" class="tsd-kind-icon">emotion</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#faceScore" class="tsd-kind-icon">face<wbr/>Score</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#gender" class="tsd-kind-icon">gender</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#genderScore" class="tsd-kind-icon">gender<wbr/>Score</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#id" class="tsd-kind-icon">id</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#iris" class="tsd-kind-icon">iris</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#live" class="tsd-kind-icon">live</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#mesh" class="tsd-kind-icon">mesh</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#meshRaw" class="tsd-kind-icon">mesh<wbr/>Raw</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#race" class="tsd-kind-icon">race</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#real" class="tsd-kind-icon">real</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#rotation" class="tsd-kind-icon">rotation</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#score" class="tsd-kind-icon">score</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="FaceResult.html#tensor" class="tsd-kind-icon">tensor</a></li></ul></li></ul></nav></div></div></div><footer class=""><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="overlay"></div><script src="../assets/main.js"></script></body></html>

View File

@ -1,23 +1,23 @@
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>HandResult | @vladmandic/human - v2.5.5</title><meta name="description" content="Documentation for @vladmandic/human - v2.5.5"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@vladmandic/human - v2.5.5</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../index.html">@vladmandic/human - v2.5.5</a></li><li><a href="HandResult.html">HandResult</a></li></ul><h1>Interface HandResult</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><div class="lead"> <!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>HandResult | @vladmandic/human - v2.5.5</title><meta name="description" content="Documentation for @vladmandic/human - v2.5.5"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@vladmandic/human - v2.5.5</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../index.html">@vladmandic/human - v2.5.5</a></li><li><a href="HandResult.html">HandResult</a></li></ul><h1>Interface HandResult</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><div class="lead">
<p>Hand results</p> <p>Hand results</p>
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">HandResult</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandResult.html#annotations" class="tsd-kind-icon">annotations</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandResult.html#box" class="tsd-kind-icon">box</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandResult.html#boxRaw" class="tsd-kind-icon">box<wbr/>Raw</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandResult.html#boxScore" class="tsd-kind-icon">box<wbr/>Score</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandResult.html#fingerScore" class="tsd-kind-icon">finger<wbr/>Score</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandResult.html#id" class="tsd-kind-icon">id</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandResult.html#keypoints" class="tsd-kind-icon">keypoints</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandResult.html#label" class="tsd-kind-icon">label</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandResult.html#landmarks" class="tsd-kind-icon">landmarks</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandResult.html#score" class="tsd-kind-icon">score</a></li></ul></section></div></section></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 id="annotations" class="tsd-anchor"></a><h3>annotations</h3><div class="tsd-signature tsd-kind-icon">annotations<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">&quot;index&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;middle&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;pinky&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;ring&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;thumb&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;palm&quot;</span><span class="tsd-signature-symbol">, </span><a href="../index.html#Point" class="tsd-signature-type" data-tsd-kind="Type alias">Point</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L112">src/result.ts:112</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">HandResult</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandResult.html#annotations" class="tsd-kind-icon">annotations</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandResult.html#box" class="tsd-kind-icon">box</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandResult.html#boxRaw" class="tsd-kind-icon">box<wbr/>Raw</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandResult.html#boxScore" class="tsd-kind-icon">box<wbr/>Score</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandResult.html#fingerScore" class="tsd-kind-icon">finger<wbr/>Score</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandResult.html#id" class="tsd-kind-icon">id</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandResult.html#keypoints" class="tsd-kind-icon">keypoints</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandResult.html#label" class="tsd-kind-icon">label</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandResult.html#landmarks" class="tsd-kind-icon">landmarks</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandResult.html#score" class="tsd-kind-icon">score</a></li></ul></section></div></section></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 id="annotations" class="tsd-anchor"></a><h3>annotations</h3><div class="tsd-signature tsd-kind-icon">annotations<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol">&lt;</span><a href="../index.html#Finger" class="tsd-signature-type" data-tsd-kind="Type alias">Finger</a><span class="tsd-signature-symbol">, </span><a href="../index.html#Point" class="tsd-signature-type" data-tsd-kind="Type alias">Point</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L137">src/result.ts:137</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>detected hand keypoints combined into annotated parts</p> <p>detected hand keypoints combined into annotated parts</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="box" class="tsd-anchor"></a><h3>box</h3><div class="tsd-signature tsd-kind-icon">box<span class="tsd-signature-symbol">:</span> <a href="../index.html#Box" class="tsd-signature-type" data-tsd-kind="Type alias">Box</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L104">src/result.ts:104</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="box" class="tsd-anchor"></a><h3>box</h3><div class="tsd-signature tsd-kind-icon">box<span class="tsd-signature-symbol">:</span> <a href="../index.html#Box" class="tsd-signature-type" data-tsd-kind="Type alias">Box</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L129">src/result.ts:129</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>detected hand box</p> <p>detected hand box</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="boxRaw" class="tsd-anchor"></a><h3>box<wbr/>Raw</h3><div class="tsd-signature tsd-kind-icon">box<wbr/>Raw<span class="tsd-signature-symbol">:</span> <a href="../index.html#Box" class="tsd-signature-type" data-tsd-kind="Type alias">Box</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L106">src/result.ts:106</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="boxRaw" class="tsd-anchor"></a><h3>box<wbr/>Raw</h3><div class="tsd-signature tsd-kind-icon">box<wbr/>Raw<span class="tsd-signature-symbol">:</span> <a href="../index.html#Box" class="tsd-signature-type" data-tsd-kind="Type alias">Box</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L131">src/result.ts:131</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>detected hand box normalized to 0..1</p> <p>detected hand box normalized to 0..1</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="boxScore" class="tsd-anchor"></a><h3>box<wbr/>Score</h3><div class="tsd-signature tsd-kind-icon">box<wbr/>Score<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L100">src/result.ts:100</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="boxScore" class="tsd-anchor"></a><h3>box<wbr/>Score</h3><div class="tsd-signature tsd-kind-icon">box<wbr/>Score<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L125">src/result.ts:125</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>hand detection score</p> <p>hand detection score</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="fingerScore" class="tsd-anchor"></a><h3>finger<wbr/>Score</h3><div class="tsd-signature tsd-kind-icon">finger<wbr/>Score<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L102">src/result.ts:102</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="fingerScore" class="tsd-anchor"></a><h3>finger<wbr/>Score</h3><div class="tsd-signature tsd-kind-icon">finger<wbr/>Score<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L127">src/result.ts:127</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>hand skelton score</p> <p>hand skelton score</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="id" class="tsd-anchor"></a><h3>id</h3><div class="tsd-signature tsd-kind-icon">id<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L96">src/result.ts:96</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="id" class="tsd-anchor"></a><h3>id</h3><div class="tsd-signature tsd-kind-icon">id<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L121">src/result.ts:121</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>hand id</p> <p>hand id</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="keypoints" class="tsd-anchor"></a><h3>keypoints</h3><div class="tsd-signature tsd-kind-icon">keypoints<span class="tsd-signature-symbol">:</span> <a href="../index.html#Point" class="tsd-signature-type" data-tsd-kind="Type alias">Point</a><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L108">src/result.ts:108</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="keypoints" class="tsd-anchor"></a><h3>keypoints</h3><div class="tsd-signature tsd-kind-icon">keypoints<span class="tsd-signature-symbol">:</span> <a href="../index.html#Point" class="tsd-signature-type" data-tsd-kind="Type alias">Point</a><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L133">src/result.ts:133</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>detected hand keypoints</p> <p>detected hand keypoints</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="label" class="tsd-anchor"></a><h3>label</h3><div class="tsd-signature tsd-kind-icon">label<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L110">src/result.ts:110</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="label" class="tsd-anchor"></a><h3>label</h3><div class="tsd-signature tsd-kind-icon">label<span class="tsd-signature-symbol">:</span> <a href="../index.html#HandType" class="tsd-signature-type" data-tsd-kind="Type alias">HandType</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L135">src/result.ts:135</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>detected hand class</p> <p>detected hand class</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="landmarks" class="tsd-anchor"></a><h3>landmarks</h3><div class="tsd-signature tsd-kind-icon">landmarks<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">&quot;index&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;middle&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;pinky&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;ring&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;thumb&quot;</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-symbol">{ </span>curl<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">&quot;none&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;full&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;half&quot;</span><span class="tsd-signature-symbol">; </span>direction<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">&quot;verticalUp&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;verticalDown&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;horizontalLeft&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;horizontalRight&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;diagonalUpRight&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;diagonalUpLeft&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;diagonalDownRight&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;diagonalDownLeft&quot;</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L117">src/result.ts:117</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="landmarks" class="tsd-anchor"></a><h3>landmarks</h3><div class="tsd-signature tsd-kind-icon">landmarks<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol">&lt;</span><a href="../index.html#Finger" class="tsd-signature-type" data-tsd-kind="Type alias">Finger</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-symbol">{ </span>curl<span class="tsd-signature-symbol">: </span><a href="../index.html#FingerCurl" class="tsd-signature-type" data-tsd-kind="Type alias">FingerCurl</a><span class="tsd-signature-symbol">; </span>direction<span class="tsd-signature-symbol">: </span><a href="../index.html#FingerDirection" class="tsd-signature-type" data-tsd-kind="Type alias">FingerDirection</a><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L139">src/result.ts:139</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>detected hand parts annotated with part gestures</p> <p>detected hand parts annotated with part gestures</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="score" class="tsd-anchor"></a><h3>score</h3><div class="tsd-signature tsd-kind-icon">score<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L98">src/result.ts:98</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="score" class="tsd-anchor"></a><h3>score</h3><div class="tsd-signature tsd-kind-icon">score<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L123">src/result.ts:123</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>hand overal score</p> <p>hand overal score</p>
</div></div></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../index.html">Exports</a></li><li class=" tsd-kind-namespace"><a href="../modules/Tensor.html">Tensor</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-interface"><a href="HandResult.html" class="tsd-kind-icon">Hand<wbr/>Result</a><ul><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandResult.html#annotations" class="tsd-kind-icon">annotations</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandResult.html#box" class="tsd-kind-icon">box</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandResult.html#boxRaw" class="tsd-kind-icon">box<wbr/>Raw</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandResult.html#boxScore" class="tsd-kind-icon">box<wbr/>Score</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandResult.html#fingerScore" class="tsd-kind-icon">finger<wbr/>Score</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandResult.html#id" class="tsd-kind-icon">id</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandResult.html#keypoints" class="tsd-kind-icon">keypoints</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandResult.html#label" class="tsd-kind-icon">label</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandResult.html#landmarks" class="tsd-kind-icon">landmarks</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandResult.html#score" class="tsd-kind-icon">score</a></li></ul></li></ul></nav></div></div></div><footer class=""><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="overlay"></div><script src="../assets/main.js"></script></body></html> </div></div></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../index.html">Exports</a></li><li class=" tsd-kind-namespace"><a href="../modules/Tensor.html">Tensor</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-interface"><a href="HandResult.html" class="tsd-kind-icon">Hand<wbr/>Result</a><ul><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandResult.html#annotations" class="tsd-kind-icon">annotations</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandResult.html#box" class="tsd-kind-icon">box</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandResult.html#boxRaw" class="tsd-kind-icon">box<wbr/>Raw</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandResult.html#boxScore" class="tsd-kind-icon">box<wbr/>Score</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandResult.html#fingerScore" class="tsd-kind-icon">finger<wbr/>Score</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandResult.html#id" class="tsd-kind-icon">id</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandResult.html#keypoints" class="tsd-kind-icon">keypoints</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandResult.html#label" class="tsd-kind-icon">label</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandResult.html#landmarks" class="tsd-kind-icon">landmarks</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="HandResult.html#score" class="tsd-kind-icon">score</a></li></ul></li></ul></nav></div></div></div><footer class=""><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="overlay"></div><script src="../assets/main.js"></script></body></html>

View File

@ -1,15 +1,15 @@
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>ObjectResult | @vladmandic/human - v2.5.5</title><meta name="description" content="Documentation for @vladmandic/human - v2.5.5"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@vladmandic/human - v2.5.5</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../index.html">@vladmandic/human - v2.5.5</a></li><li><a href="ObjectResult.html">ObjectResult</a></li></ul><h1>Interface ObjectResult</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><div class="lead"> <!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>ObjectResult | @vladmandic/human - v2.5.5</title><meta name="description" content="Documentation for @vladmandic/human - v2.5.5"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@vladmandic/human - v2.5.5</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../index.html">@vladmandic/human - v2.5.5</a></li><li><a href="ObjectResult.html">ObjectResult</a></li></ul><h1>Interface ObjectResult</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><div class="lead">
<p>Object results</p> <p>Object results</p>
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">ObjectResult</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface"><a href="ObjectResult.html#box" class="tsd-kind-icon">box</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="ObjectResult.html#boxRaw" class="tsd-kind-icon">box<wbr/>Raw</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="ObjectResult.html#class" class="tsd-kind-icon">class</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="ObjectResult.html#id" class="tsd-kind-icon">id</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="ObjectResult.html#label" class="tsd-kind-icon">label</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="ObjectResult.html#score" class="tsd-kind-icon">score</a></li></ul></section></div></section></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 id="box" class="tsd-anchor"></a><h3>box</h3><div class="tsd-signature tsd-kind-icon">box<span class="tsd-signature-symbol">:</span> <a href="../index.html#Box" class="tsd-signature-type" data-tsd-kind="Type alias">Box</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L134">src/result.ts:134</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">ObjectResult</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface"><a href="ObjectResult.html#box" class="tsd-kind-icon">box</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="ObjectResult.html#boxRaw" class="tsd-kind-icon">box<wbr/>Raw</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="ObjectResult.html#class" class="tsd-kind-icon">class</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="ObjectResult.html#id" class="tsd-kind-icon">id</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="ObjectResult.html#label" class="tsd-kind-icon">label</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="ObjectResult.html#score" class="tsd-kind-icon">score</a></li></ul></section></div></section></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 id="box" class="tsd-anchor"></a><h3>box</h3><div class="tsd-signature tsd-kind-icon">box<span class="tsd-signature-symbol">:</span> <a href="../index.html#Box" class="tsd-signature-type" data-tsd-kind="Type alias">Box</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L160">src/result.ts:160</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>detected object box</p> <p>detected object box</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="boxRaw" class="tsd-anchor"></a><h3>box<wbr/>Raw</h3><div class="tsd-signature tsd-kind-icon">box<wbr/>Raw<span class="tsd-signature-symbol">:</span> <a href="../index.html#Box" class="tsd-signature-type" data-tsd-kind="Type alias">Box</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L136">src/result.ts:136</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="boxRaw" class="tsd-anchor"></a><h3>box<wbr/>Raw</h3><div class="tsd-signature tsd-kind-icon">box<wbr/>Raw<span class="tsd-signature-symbol">:</span> <a href="../index.html#Box" class="tsd-signature-type" data-tsd-kind="Type alias">Box</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L162">src/result.ts:162</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>detected object box normalized to 0..1</p> <p>detected object box normalized to 0..1</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="class" class="tsd-anchor"></a><h3>class</h3><div class="tsd-signature tsd-kind-icon">class<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L130">src/result.ts:130</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="class" class="tsd-anchor"></a><h3>class</h3><div class="tsd-signature tsd-kind-icon">class<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L156">src/result.ts:156</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>detected object class id</p> <p>detected object class id</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="id" class="tsd-anchor"></a><h3>id</h3><div class="tsd-signature tsd-kind-icon">id<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L126">src/result.ts:126</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="id" class="tsd-anchor"></a><h3>id</h3><div class="tsd-signature tsd-kind-icon">id<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L152">src/result.ts:152</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>object id</p> <p>object id</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="label" class="tsd-anchor"></a><h3>label</h3><div class="tsd-signature tsd-kind-icon">label<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L132">src/result.ts:132</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="label" class="tsd-anchor"></a><h3>label</h3><div class="tsd-signature tsd-kind-icon">label<span class="tsd-signature-symbol">:</span> <a href="../index.html#ObjectType" class="tsd-signature-type" data-tsd-kind="Type alias">ObjectType</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L158">src/result.ts:158</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>detected object class name</p> <p>detected object class name</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="score" class="tsd-anchor"></a><h3>score</h3><div class="tsd-signature tsd-kind-icon">score<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L128">src/result.ts:128</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="score" class="tsd-anchor"></a><h3>score</h3><div class="tsd-signature tsd-kind-icon">score<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L154">src/result.ts:154</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>object detection score</p> <p>object detection score</p>
</div></div></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../index.html">Exports</a></li><li class=" tsd-kind-namespace"><a href="../modules/Tensor.html">Tensor</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-interface"><a href="ObjectResult.html" class="tsd-kind-icon">Object<wbr/>Result</a><ul><li class="tsd-kind-property tsd-parent-kind-interface"><a href="ObjectResult.html#box" class="tsd-kind-icon">box</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="ObjectResult.html#boxRaw" class="tsd-kind-icon">box<wbr/>Raw</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="ObjectResult.html#class" class="tsd-kind-icon">class</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="ObjectResult.html#id" class="tsd-kind-icon">id</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="ObjectResult.html#label" class="tsd-kind-icon">label</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="ObjectResult.html#score" class="tsd-kind-icon">score</a></li></ul></li></ul></nav></div></div></div><footer class=""><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="overlay"></div><script src="../assets/main.js"></script></body></html> </div></div></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../index.html">Exports</a></li><li class=" tsd-kind-namespace"><a href="../modules/Tensor.html">Tensor</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-interface"><a href="ObjectResult.html" class="tsd-kind-icon">Object<wbr/>Result</a><ul><li class="tsd-kind-property tsd-parent-kind-interface"><a href="ObjectResult.html#box" class="tsd-kind-icon">box</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="ObjectResult.html#boxRaw" class="tsd-kind-icon">box<wbr/>Raw</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="ObjectResult.html#class" class="tsd-kind-icon">class</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="ObjectResult.html#id" class="tsd-kind-icon">id</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="ObjectResult.html#label" class="tsd-kind-icon">label</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="ObjectResult.html#score" class="tsd-kind-icon">score</a></li></ul></li></ul></nav></div></div></div><footer class=""><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="overlay"></div><script src="../assets/main.js"></script></body></html>

View File

@ -3,18 +3,18 @@
<ul> <ul>
<li>Triggers combining all individual results into a virtual person object</li> <li>Triggers combining all individual results into a virtual person object</li>
</ul> </ul>
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">PersonResult</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface"><a href="PersonResult.html#body" class="tsd-kind-icon">body</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="PersonResult.html#box" class="tsd-kind-icon">box</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="PersonResult.html#boxRaw" class="tsd-kind-icon">box<wbr/>Raw</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="PersonResult.html#face" class="tsd-kind-icon">face</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="PersonResult.html#gestures" class="tsd-kind-icon">gestures</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="PersonResult.html#hands" class="tsd-kind-icon">hands</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="PersonResult.html#id" class="tsd-kind-icon">id</a></li></ul></section></div></section></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 id="body" class="tsd-anchor"></a><h3>body</h3><div class="tsd-signature tsd-kind-icon">body<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="BodyResult.html" class="tsd-signature-type" data-tsd-kind="Interface">BodyResult</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L159">src/result.ts:159</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">PersonResult</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface"><a href="PersonResult.html#body" class="tsd-kind-icon">body</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="PersonResult.html#box" class="tsd-kind-icon">box</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="PersonResult.html#boxRaw" class="tsd-kind-icon">box<wbr/>Raw</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="PersonResult.html#face" class="tsd-kind-icon">face</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="PersonResult.html#gestures" class="tsd-kind-icon">gestures</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="PersonResult.html#hands" class="tsd-kind-icon">hands</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="PersonResult.html#id" class="tsd-kind-icon">id</a></li></ul></section></div></section></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 id="body" class="tsd-anchor"></a><h3>body</h3><div class="tsd-signature tsd-kind-icon">body<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="BodyResult.html" class="tsd-signature-type" data-tsd-kind="Interface">BodyResult</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L185">src/result.ts:185</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>body result that belongs to this person</p> <p>body result that belongs to this person</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="box" class="tsd-anchor"></a><h3>box</h3><div class="tsd-signature tsd-kind-icon">box<span class="tsd-signature-symbol">:</span> <a href="../index.html#Box" class="tsd-signature-type" data-tsd-kind="Type alias">Box</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L165">src/result.ts:165</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="box" class="tsd-anchor"></a><h3>box</h3><div class="tsd-signature tsd-kind-icon">box<span class="tsd-signature-symbol">:</span> <a href="../index.html#Box" class="tsd-signature-type" data-tsd-kind="Type alias">Box</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L191">src/result.ts:191</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>box that defines the person</p> <p>box that defines the person</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="boxRaw" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagOptional">Optional</span> box<wbr/>Raw</h3><div class="tsd-signature tsd-kind-icon">box<wbr/>Raw<span class="tsd-signature-symbol">?:</span> <a href="../index.html#Box" class="tsd-signature-type" data-tsd-kind="Type alias">Box</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L167">src/result.ts:167</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="boxRaw" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagOptional">Optional</span> box<wbr/>Raw</h3><div class="tsd-signature tsd-kind-icon">box<wbr/>Raw<span class="tsd-signature-symbol">?:</span> <a href="../index.html#Box" class="tsd-signature-type" data-tsd-kind="Type alias">Box</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L193">src/result.ts:193</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>box that defines the person normalized to 0..1</p> <p>box that defines the person normalized to 0..1</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="face" class="tsd-anchor"></a><h3>face</h3><div class="tsd-signature tsd-kind-icon">face<span class="tsd-signature-symbol">:</span> <a href="FaceResult.html" class="tsd-signature-type" data-tsd-kind="Interface">FaceResult</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L157">src/result.ts:157</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="face" class="tsd-anchor"></a><h3>face</h3><div class="tsd-signature tsd-kind-icon">face<span class="tsd-signature-symbol">:</span> <a href="FaceResult.html" class="tsd-signature-type" data-tsd-kind="Interface">FaceResult</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L183">src/result.ts:183</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>face result that belongs to this person</p> <p>face result that belongs to this person</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="gestures" class="tsd-anchor"></a><h3>gestures</h3><div class="tsd-signature tsd-kind-icon">gestures<span class="tsd-signature-symbol">:</span> <a href="../index.html#GestureResult" class="tsd-signature-type" data-tsd-kind="Type alias">GestureResult</a><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L163">src/result.ts:163</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="gestures" class="tsd-anchor"></a><h3>gestures</h3><div class="tsd-signature tsd-kind-icon">gestures<span class="tsd-signature-symbol">:</span> <a href="../index.html#GestureResult" class="tsd-signature-type" data-tsd-kind="Type alias">GestureResult</a><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L189">src/result.ts:189</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>detected gestures specific to this person</p> <p>detected gestures specific to this person</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="hands" class="tsd-anchor"></a><h3>hands</h3><div class="tsd-signature tsd-kind-icon">hands<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span>left<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="HandResult.html" class="tsd-signature-type" data-tsd-kind="Interface">HandResult</a><span class="tsd-signature-symbol">; </span>right<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="HandResult.html" class="tsd-signature-type" data-tsd-kind="Interface">HandResult</a><span class="tsd-signature-symbol"> }</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L161">src/result.ts:161</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="hands" class="tsd-anchor"></a><h3>hands</h3><div class="tsd-signature tsd-kind-icon">hands<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span>left<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="HandResult.html" class="tsd-signature-type" data-tsd-kind="Interface">HandResult</a><span class="tsd-signature-symbol">; </span>right<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="HandResult.html" class="tsd-signature-type" data-tsd-kind="Interface">HandResult</a><span class="tsd-signature-symbol"> }</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L187">src/result.ts:187</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>left and right hand results that belong to this person</p> <p>left and right hand results that belong to this person</p>
</div></div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter"><h5>left<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="HandResult.html" class="tsd-signature-type" data-tsd-kind="Interface">HandResult</a></h5></li><li class="tsd-parameter"><h5>right<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="HandResult.html" class="tsd-signature-type" data-tsd-kind="Interface">HandResult</a></h5></li></ul></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="id" class="tsd-anchor"></a><h3>id</h3><div class="tsd-signature tsd-kind-icon">id<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L155">src/result.ts:155</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter"><h5>left<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="HandResult.html" class="tsd-signature-type" data-tsd-kind="Interface">HandResult</a></h5></li><li class="tsd-parameter"><h5>right<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="HandResult.html" class="tsd-signature-type" data-tsd-kind="Interface">HandResult</a></h5></li></ul></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="id" class="tsd-anchor"></a><h3>id</h3><div class="tsd-signature tsd-kind-icon">id<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L181">src/result.ts:181</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>person id</p> <p>person id</p>
</div></div></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../index.html">Exports</a></li><li class=" tsd-kind-namespace"><a href="../modules/Tensor.html">Tensor</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-interface"><a href="PersonResult.html" class="tsd-kind-icon">Person<wbr/>Result</a><ul><li class="tsd-kind-property tsd-parent-kind-interface"><a href="PersonResult.html#body" class="tsd-kind-icon">body</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="PersonResult.html#box" class="tsd-kind-icon">box</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="PersonResult.html#boxRaw" class="tsd-kind-icon">box<wbr/>Raw</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="PersonResult.html#face" class="tsd-kind-icon">face</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="PersonResult.html#gestures" class="tsd-kind-icon">gestures</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="PersonResult.html#hands" class="tsd-kind-icon">hands</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="PersonResult.html#id" class="tsd-kind-icon">id</a></li></ul></li></ul></nav></div></div></div><footer class=""><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="overlay"></div><script src="../assets/main.js"></script></body></html> </div></div></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../index.html">Exports</a></li><li class=" tsd-kind-namespace"><a href="../modules/Tensor.html">Tensor</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-interface"><a href="PersonResult.html" class="tsd-kind-icon">Person<wbr/>Result</a><ul><li class="tsd-kind-property tsd-parent-kind-interface"><a href="PersonResult.html#body" class="tsd-kind-icon">body</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="PersonResult.html#box" class="tsd-kind-icon">box</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="PersonResult.html#boxRaw" class="tsd-kind-icon">box<wbr/>Raw</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="PersonResult.html#face" class="tsd-kind-icon">face</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="PersonResult.html#gestures" class="tsd-kind-icon">gestures</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="PersonResult.html#hands" class="tsd-kind-icon">hands</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="PersonResult.html#id" class="tsd-kind-icon">id</a></li></ul></li></ul></nav></div></div></div><footer class=""><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="overlay"></div><script src="../assets/main.js"></script></body></html>

View File

@ -1,24 +1,24 @@
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Result | @vladmandic/human - v2.5.5</title><meta name="description" content="Documentation for @vladmandic/human - v2.5.5"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@vladmandic/human - v2.5.5</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../index.html">@vladmandic/human - v2.5.5</a></li><li><a href="Result.html">Result</a></li></ul><h1>Interface Result</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><div class="lead"> <!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Result | @vladmandic/human - v2.5.5</title><meta name="description" content="Documentation for @vladmandic/human - v2.5.5"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@vladmandic/human - v2.5.5</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../index.html">@vladmandic/human - v2.5.5</a></li><li><a href="Result.html">Result</a></li></ul><h1>Interface Result</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><div class="lead">
<p>Result interface definition for <strong>Human</strong> library</p> <p>Result interface definition for <strong>Human</strong> library</p>
</div><div><p>Contains all possible detection results</p> </div><div><p>Contains all possible detection results</p>
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">Result</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#body" class="tsd-kind-icon">body</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#canvas" class="tsd-kind-icon">canvas</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#error" class="tsd-kind-icon">error</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#face" class="tsd-kind-icon">face</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#gesture" class="tsd-kind-icon">gesture</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#hand" class="tsd-kind-icon">hand</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#object" class="tsd-kind-icon">object</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#performance" class="tsd-kind-icon">performance</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#persons" class="tsd-kind-icon">persons</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#timestamp" class="tsd-kind-icon">timestamp</a></li></ul></section></div></section></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 id="body" class="tsd-anchor"></a><h3>body</h3><div class="tsd-signature tsd-kind-icon">body<span class="tsd-signature-symbol">:</span> <a href="BodyResult.html" class="tsd-signature-type" data-tsd-kind="Interface">BodyResult</a><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L179">src/result.ts:179</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">Result</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#body" class="tsd-kind-icon">body</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#canvas" class="tsd-kind-icon">canvas</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#error" class="tsd-kind-icon">error</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#face" class="tsd-kind-icon">face</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#gesture" class="tsd-kind-icon">gesture</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#hand" class="tsd-kind-icon">hand</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#object" class="tsd-kind-icon">object</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#performance" class="tsd-kind-icon">performance</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#persons" class="tsd-kind-icon">persons</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#timestamp" class="tsd-kind-icon">timestamp</a></li></ul></section></div></section></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 id="body" class="tsd-anchor"></a><h3>body</h3><div class="tsd-signature tsd-kind-icon">body<span class="tsd-signature-symbol">:</span> <a href="BodyResult.html" class="tsd-signature-type" data-tsd-kind="Interface">BodyResult</a><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L205">src/result.ts:205</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p><a href="BodyResult.html">BodyResult</a>: detection &amp; analysis results</p> <p><a href="BodyResult.html">BodyResult</a>: detection &amp; analysis results</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="canvas" class="tsd-anchor"></a><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">null</span><span class="tsd-signature-symbol"> | </span><a href="../index.html#AnyCanvas" class="tsd-signature-type" data-tsd-kind="Type alias">AnyCanvas</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L189">src/result.ts:189</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="canvas" class="tsd-anchor"></a><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">null</span><span class="tsd-signature-symbol"> | </span><a href="../index.html#AnyCanvas" class="tsd-signature-type" data-tsd-kind="Type alias">AnyCanvas</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L215">src/result.ts:215</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>optional processed canvas that can be used to draw input on screen</p> <p>optional processed canvas that can be used to draw input on screen</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="error" class="tsd-anchor"></a><h3>error</h3><div class="tsd-signature tsd-kind-icon">error<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L195">src/result.ts:195</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="error" class="tsd-anchor"></a><h3>error</h3><div class="tsd-signature tsd-kind-icon">error<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L221">src/result.ts:221</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Last known error message</p> <p>Last known error message</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="face" class="tsd-anchor"></a><h3>face</h3><div class="tsd-signature tsd-kind-icon">face<span class="tsd-signature-symbol">:</span> <a href="FaceResult.html" class="tsd-signature-type" data-tsd-kind="Interface">FaceResult</a><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L177">src/result.ts:177</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="face" class="tsd-anchor"></a><h3>face</h3><div class="tsd-signature tsd-kind-icon">face<span class="tsd-signature-symbol">:</span> <a href="FaceResult.html" class="tsd-signature-type" data-tsd-kind="Interface">FaceResult</a><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L203">src/result.ts:203</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p><a href="FaceResult.html">FaceResult</a>: detection &amp; analysis results</p> <p><a href="FaceResult.html">FaceResult</a>: detection &amp; analysis results</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="gesture" class="tsd-anchor"></a><h3>gesture</h3><div class="tsd-signature tsd-kind-icon">gesture<span class="tsd-signature-symbol">:</span> <a href="../index.html#GestureResult" class="tsd-signature-type" data-tsd-kind="Type alias">GestureResult</a><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L183">src/result.ts:183</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="gesture" class="tsd-anchor"></a><h3>gesture</h3><div class="tsd-signature tsd-kind-icon">gesture<span class="tsd-signature-symbol">:</span> <a href="../index.html#GestureResult" class="tsd-signature-type" data-tsd-kind="Type alias">GestureResult</a><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L209">src/result.ts:209</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p><a href="../index.html#GestureResult">GestureResult</a>: detection &amp; analysis results</p> <p><a href="../index.html#GestureResult">GestureResult</a>: detection &amp; analysis results</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="hand" class="tsd-anchor"></a><h3>hand</h3><div class="tsd-signature tsd-kind-icon">hand<span class="tsd-signature-symbol">:</span> <a href="HandResult.html" class="tsd-signature-type" data-tsd-kind="Interface">HandResult</a><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L181">src/result.ts:181</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="hand" class="tsd-anchor"></a><h3>hand</h3><div class="tsd-signature tsd-kind-icon">hand<span class="tsd-signature-symbol">:</span> <a href="HandResult.html" class="tsd-signature-type" data-tsd-kind="Interface">HandResult</a><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L207">src/result.ts:207</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p><a href="HandResult.html">HandResult</a>: detection &amp; analysis results</p> <p><a href="HandResult.html">HandResult</a>: detection &amp; analysis results</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="object" class="tsd-anchor"></a><h3>object</h3><div class="tsd-signature tsd-kind-icon">object<span class="tsd-signature-symbol">:</span> <a href="ObjectResult.html" class="tsd-signature-type" data-tsd-kind="Interface">ObjectResult</a><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L185">src/result.ts:185</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="object" class="tsd-anchor"></a><h3>object</h3><div class="tsd-signature tsd-kind-icon">object<span class="tsd-signature-symbol">:</span> <a href="ObjectResult.html" class="tsd-signature-type" data-tsd-kind="Interface">ObjectResult</a><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L211">src/result.ts:211</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p><a href="ObjectResult.html">ObjectResult</a>: detection &amp; analysis results</p> <p><a href="ObjectResult.html">ObjectResult</a>: detection &amp; analysis results</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="performance" class="tsd-anchor"></a><h3>performance</h3><div class="tsd-signature tsd-kind-icon">performance<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L187">src/result.ts:187</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="performance" class="tsd-anchor"></a><h3>performance</h3><div class="tsd-signature tsd-kind-icon">performance<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L213">src/result.ts:213</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>global performance object with timing values for each operation</p> <p>global performance object with timing values for each operation</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="persons" class="tsd-anchor"></a><h3>persons</h3><div class="tsd-signature tsd-kind-icon">persons<span class="tsd-signature-symbol">:</span> <a href="PersonResult.html" class="tsd-signature-type" data-tsd-kind="Interface">PersonResult</a><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L193">src/result.ts:193</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="persons" class="tsd-anchor"></a><h3>persons</h3><div class="tsd-signature tsd-kind-icon">persons<span class="tsd-signature-symbol">:</span> <a href="PersonResult.html" class="tsd-signature-type" data-tsd-kind="Interface">PersonResult</a><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L219">src/result.ts:219</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>getter property that returns unified persons object</p> <p>getter property that returns unified persons object</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="timestamp" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagReadonly">Readonly</span> timestamp</h3><div class="tsd-signature tsd-kind-icon">timestamp<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L191">src/result.ts:191</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> </div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="timestamp" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagReadonly">Readonly</span> timestamp</h3><div class="tsd-signature tsd-kind-icon">timestamp<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/human/blob/main/src/result.ts#L217">src/result.ts:217</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>timestamp of detection representing the milliseconds elapsed since the UNIX epoch</p> <p>timestamp of detection representing the milliseconds elapsed since the UNIX epoch</p>
</div></div></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../index.html">Exports</a></li><li class=" tsd-kind-namespace"><a href="../modules/Tensor.html">Tensor</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-interface"><a href="Result.html" class="tsd-kind-icon">Result</a><ul><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#body" class="tsd-kind-icon">body</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#canvas" class="tsd-kind-icon">canvas</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#error" class="tsd-kind-icon">error</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#face" class="tsd-kind-icon">face</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#gesture" class="tsd-kind-icon">gesture</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#hand" class="tsd-kind-icon">hand</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#object" class="tsd-kind-icon">object</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#performance" class="tsd-kind-icon">performance</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#persons" class="tsd-kind-icon">persons</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#timestamp" class="tsd-kind-icon">timestamp</a></li></ul></li></ul></nav></div></div></div><footer class=""><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="overlay"></div><script src="../assets/main.js"></script></body></html> </div></div></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../index.html">Exports</a></li><li class=" tsd-kind-namespace"><a href="../modules/Tensor.html">Tensor</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-interface"><a href="Result.html" class="tsd-kind-icon">Result</a><ul><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#body" class="tsd-kind-icon">body</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#canvas" class="tsd-kind-icon">canvas</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#error" class="tsd-kind-icon">error</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#face" class="tsd-kind-icon">face</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#gesture" class="tsd-kind-icon">gesture</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#hand" class="tsd-kind-icon">hand</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#object" class="tsd-kind-icon">object</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#performance" class="tsd-kind-icon">performance</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#persons" class="tsd-kind-icon">persons</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="Result.html#timestamp" class="tsd-kind-icon">timestamp</a></li></ul></li></ul></nav></div></div></div><footer class=""><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="overlay"></div><script src="../assets/main.js"></script></body></html>

58
types/human.d.ts vendored
View File

@ -29,6 +29,12 @@ export declare type BackendType = ['cpu', 'wasm', 'webgl', 'humangl', 'tensorflo
/** draw detected bodies */ /** draw detected bodies */
declare function body(inCanvas: AnyCanvas, result: Array<BodyResult>, drawOptions?: Partial<DrawOptions>): Promise<void>; declare function body(inCanvas: AnyCanvas, result: Array<BodyResult>, drawOptions?: Partial<DrawOptions>): Promise<void>;
export declare type BodyAnnotation = BodyAnnotationBlazePose | BodyAnnotationEfficientPose;
export declare type BodyAnnotationBlazePose = 'leftLeg' | 'rightLeg' | 'torso' | 'leftArm' | 'rightArm' | 'leftEye' | 'rightEye' | 'mouth';
export declare type BodyAnnotationEfficientPose = 'leftLeg' | 'rightLeg' | 'torso' | 'leftArm' | 'rightArm' | 'head';
/** Configures all body detection specific options */ /** Configures all body detection specific options */
export declare interface BodyConfig extends GenericConfig { export declare interface BodyConfig extends GenericConfig {
/** maximum numboer of detected bodies */ /** maximum numboer of detected bodies */
@ -43,7 +49,7 @@ export declare type BodyGesture = `leaning ${'left' | 'right'}` | `raise ${'left
/** Body Result keypoints */ /** Body Result keypoints */
export declare interface BodyKeypoint { export declare interface BodyKeypoint {
/** body part name */ /** body part name */
part: string; part: BodyLandmark;
/** body part position */ /** body part position */
position: Point; position: Point;
/** body part position normalized to 0..1 */ /** body part position normalized to 0..1 */
@ -52,6 +58,16 @@ export declare interface BodyKeypoint {
score: number; score: number;
} }
export declare type BodyLandmark = BodyLandmarkPoseNet | BodyLandmarkMoveNet | BodyLandmarkEfficientNet | BodyLandmarkBlazePose;
export declare type BodyLandmarkBlazePose = 'nose' | 'leftEyeInside' | 'leftEye' | 'leftEyeOutside' | 'rightEyeInside' | 'rightEye' | 'rightEyeOutside' | 'leftEar' | 'rightEar' | 'leftMouth' | 'rightMouth' | 'leftShoulder' | 'rightShoulder' | 'leftElbow' | 'rightElbow' | 'leftWrist' | 'rightWrist' | 'leftPinky' | 'rightPinky' | 'leftIndex' | 'rightIndex' | 'leftThumb' | 'rightThumb' | 'leftHip' | 'rightHip' | 'leftKnee' | 'rightKnee' | 'leftAnkle' | 'rightAnkle' | 'leftHeel' | 'rightHeel' | 'leftFoot' | 'rightFoot' | 'bodyCenter' | 'bodyTop' | 'leftPalm' | 'leftHand' | 'rightPalm' | 'rightHand';
export declare type BodyLandmarkEfficientNet = 'head' | 'neck' | 'rightShoulder' | 'rightElbow' | 'rightWrist' | 'chest' | 'leftShoulder' | 'leftElbow' | 'leftWrist' | 'bodyCenter' | 'rightHip' | 'rightKnee' | 'rightAnkle' | 'leftHip' | 'leftKnee' | 'leftAnkle';
export declare type BodyLandmarkMoveNet = 'nose' | 'leftEye' | 'rightEye' | 'leftEar' | 'rightEar' | 'leftShoulder' | 'rightShoulder' | 'leftElbow' | 'rightElbow' | 'leftWrist' | 'rightWrist' | 'leftHip' | 'rightHip' | 'leftKnee' | 'rightKnee' | 'leftAnkle' | 'rightAnkle';
export declare type BodyLandmarkPoseNet = 'nose' | 'leftEye' | 'rightEye' | 'leftEar' | 'rightEar' | 'leftShoulder' | 'rightShoulder' | 'leftElbow' | 'rightElbow' | 'leftWrist' | 'rightWrist' | 'leftHip' | 'rightHip' | 'leftKnee' | 'rightKnee' | 'leftAnkle' | 'rightAnkle';
/** Body results */ /** Body results */
export declare interface BodyResult { export declare interface BodyResult {
/** body id */ /** body id */
@ -65,7 +81,7 @@ export declare interface BodyResult {
/** detected body keypoints */ /** detected body keypoints */
keypoints: Array<BodyKeypoint>; keypoints: Array<BodyKeypoint>;
/** detected body keypoints combined into annotated parts */ /** detected body keypoints combined into annotated parts */
annotations: Record<string, Array<Point[]>>; annotations: Record<BodyAnnotation, Point[][]>;
} }
/** generic box as [x, y, width, height] */ /** generic box as [x, y, width, height] */
@ -356,6 +372,8 @@ export declare type DrawOptions = {
useCurves: boolean; useCurves: boolean;
}; };
export declare type Emotion = 'angry' | 'disgust' | 'fear' | 'happy' | 'sad' | 'surprise' | 'neutral';
/** /**
* Encode a map from names to weight values as an ArrayBuffer, along with an * Encode a map from names to weight values as an ArrayBuffer, along with an
* `Array` of `WeightsManifestEntry` as specification of the encoded weights. * `Array` of `WeightsManifestEntry` as specification of the encoded weights.
@ -519,6 +537,8 @@ export declare type FaceGesture = `facing ${'left' | 'center' | 'right'}` | `bli
export declare interface FaceIrisConfig extends GenericConfig { export declare interface FaceIrisConfig extends GenericConfig {
} }
export declare type FaceLandmark = 'leftEye' | 'rightEye' | 'nose' | 'mouth' | 'leftEar' | 'rightEar' | 'symmetryLine' | 'silhouette' | 'lipsUpperOuter' | 'lipsLowerOuter' | 'lipsUpperInner' | 'lipsLowerInner' | 'rightEyeUpper0' | 'rightEyeLower0' | 'rightEyeUpper1' | 'rightEyeLower1' | 'rightEyeUpper2' | 'rightEyeLower2' | 'rightEyeLower3' | 'rightEyebrowUpper' | 'rightEyebrowLower' | 'rightEyeIris' | 'leftEyeUpper0' | 'leftEyeLower0' | 'leftEyeUpper1' | 'leftEyeLower1' | 'leftEyeUpper2' | 'leftEyeLower2' | 'leftEyeLower3' | 'leftEyebrowUpper' | 'leftEyebrowLower' | 'leftEyeIris' | 'midwayBetweenEyes' | 'noseTip' | 'noseBottom' | 'noseRightCorner' | 'noseLeftCorner' | 'rightCheek' | 'leftCheek';
/** Liveness part of face configuration */ /** Liveness part of face configuration */
export declare interface FaceLivenessConfig extends GenericConfig { export declare interface FaceLivenessConfig extends GenericConfig {
} }
@ -549,22 +569,22 @@ export declare interface FaceResult {
/** detected face mesh normalized to 0..1 */ /** detected face mesh normalized to 0..1 */
meshRaw: Array<Point>; meshRaw: Array<Point>;
/** mesh keypoints combined into annotated results */ /** mesh keypoints combined into annotated results */
annotations: Record<string, Point[]>; annotations: Record<FaceLandmark, Point[]>;
/** detected age */ /** detected age */
age?: number; age?: number;
/** detected gender */ /** detected gender */
gender?: string; gender?: Gender;
/** gender detection score */ /** gender detection score */
genderScore?: number; genderScore?: number;
/** detected emotions */ /** detected emotions */
emotion?: Array<{ emotion?: Array<{
score: number; score: number;
emotion: string; emotion: Emotion;
}>; }>;
/** detected race */ /** detected race */
race?: Array<{ race?: Array<{
score: number; score: number;
race: string; race: Race;
}>; }>;
/** face descriptor */ /** face descriptor */
embedding?: Array<number>; embedding?: Array<number>;
@ -646,6 +666,12 @@ export declare interface FilterConfig {
pixelate: number; pixelate: number;
} }
export declare type Finger = 'index' | 'middle' | 'pinky' | 'ring' | 'thumb' | 'palm';
export declare type FingerCurl = 'none' | 'half' | 'full';
export declare type FingerDirection = 'verticalUp' | 'verticalDown' | 'horizontalLeft' | 'horizontalRight' | 'diagonalUpRight' | 'diagonalUpLeft' | 'diagonalDownRight' | 'diagonalDownLeft';
/** /**
* Creates an IOHandler that loads model artifacts from memory. * Creates an IOHandler that loads model artifacts from memory.
* *
@ -669,6 +695,8 @@ export declare interface FilterConfig {
*/ */
declare function fromMemory(modelArtifacts: {} | ModelArtifacts, weightSpecs?: WeightsManifestEntry[], weightData?: ArrayBuffer, trainingConfig?: TrainingConfig): IOHandler; declare function fromMemory(modelArtifacts: {} | ModelArtifacts, weightSpecs?: WeightsManifestEntry[], weightData?: ArrayBuffer, trainingConfig?: TrainingConfig): IOHandler;
export declare type Gender = 'male' | 'female' | 'unknown';
/** Generic config type inherited by all module types */ /** Generic config type inherited by all module types */
export declare interface GenericConfig { export declare interface GenericConfig {
/** is module enabled? */ /** is module enabled? */
@ -970,16 +998,18 @@ export declare interface HandResult {
/** detected hand keypoints */ /** detected hand keypoints */
keypoints: Array<Point>; keypoints: Array<Point>;
/** detected hand class */ /** detected hand class */
label: string; label: HandType;
/** detected hand keypoints combined into annotated parts */ /** detected hand keypoints combined into annotated parts */
annotations: Record<'index' | 'middle' | 'pinky' | 'ring' | 'thumb' | 'palm', Array<Point>>; annotations: Record<Finger, Array<Point>>;
/** detected hand parts annotated with part gestures */ /** detected hand parts annotated with part gestures */
landmarks: Record<'index' | 'middle' | 'pinky' | 'ring' | 'thumb', { landmarks: Record<Finger, {
curl: 'none' | 'half' | 'full'; curl: FingerCurl;
direction: 'verticalUp' | 'verticalDown' | 'horizontalLeft' | 'horizontalRight' | 'diagonalUpRight' | 'diagonalUpLeft' | 'diagonalDownRight' | 'diagonalDownLeft'; direction: FingerDirection;
}>; }>;
} }
export declare type HandType = 'hand' | 'fist' | 'pinch' | 'point' | 'face' | 'tip' | 'pinchtip';
/** /**
* Creates an IOHandler subtype that sends model artifacts to HTTP server. * Creates an IOHandler subtype that sends model artifacts to HTTP server.
* *
@ -1865,13 +1895,15 @@ export declare interface ObjectResult {
/** detected object class id */ /** detected object class id */
class: number; class: number;
/** detected object class name */ /** detected object class name */
label: string; label: ObjectType;
/** detected object box */ /** detected object box */
box: Box; box: Box;
/** detected object box normalized to 0..1 */ /** detected object box normalized to 0..1 */
boxRaw: Box; boxRaw: Box;
} }
export declare type ObjectType = 'person' | 'bicycle' | 'car' | 'motorcycle' | 'airplane' | 'bus' | 'train' | 'truck' | 'boat' | 'traffic light' | 'fire hydrant' | 'stop sign' | 'parking meter' | 'bench' | 'bird' | 'cat' | 'dog' | 'horse' | 'sheep' | 'cow' | 'elephant' | 'bear' | 'zebra' | 'giraffe' | 'backpack' | 'umbrella' | 'handbag' | 'tie' | 'suitcase' | 'frisbee' | 'skis' | 'snowboard' | 'sports ball' | 'kite' | 'baseball bat' | 'baseball glove' | 'skateboard' | 'surfboard' | 'tennis racket' | 'bottle' | 'wine glass' | 'cup' | 'fork' | 'knife' | 'spoon' | 'bowl' | 'banana' | 'apple' | 'sandwich' | 'orange' | 'broccoli' | 'carrot' | 'hot dog' | 'pizza' | 'donut' | 'cake' | 'chair' | 'couch' | 'potted plant' | 'bed' | 'dining table' | 'toilet' | 'tv' | 'laptop' | 'mouse' | 'remote' | 'keyboard' | 'cell phone' | 'microwave' | 'oven' | 'toaster' | 'sink' | 'refrigerator' | 'book' | 'clock' | 'vase' | 'scissors' | 'teddy bear' | 'hair drier' | 'toothbrush';
/** /**
* Callback for the progress of a long-running action such as an HTTP * Callback for the progress of a long-running action such as an HTTP
* request for a large binary object. * request for a large binary object.
@ -1913,6 +1945,8 @@ export declare interface PersonResult {
/** generic point as [x, y, z?] */ /** generic point as [x, y, z?] */
export declare type Point = [number, number, number?]; export declare type Point = [number, number, number?];
export declare type Race = 'white' | 'black' | 'asian' | 'indian' | 'other';
export declare enum Rank { export declare enum Rank {
R0 = "R0", R0 = "R0",
R1 = "R1", R1 = "R1",