## Index

### References

- default

### Namespaces

- Tensor

### Enumerations

- Rank

### Classes

- Env
- GraphModel
- Human
- Models
- Tensor

### Interfaces

- BodyConfig
- BodyKeypoint
- BodyResult
- Config
- FaceAntiSpoofConfig
- FaceConfig
- FaceDescriptionConfig
- FaceDetectorConfig
- FaceEmotionConfig
- FaceIrisConfig
- FaceLivenessConfig
- FaceMeshConfig
- FaceResult
- FilterConfig
- GenericConfig
- GestureConfig
- HandConfig
- HandResult
- ObjectConfig
- ObjectResult
- PersonResult
- Result
- SegmentationConfig

### Type aliases

- AnyCanvas
- AnyImage
- AnyVideo
- BackendType
- BodyAnnotation
- BodyAnnotationBlazePose
- BodyAnnotationEfficientPose
- BodyGesture
- BodyLandmark
- BodyLandmarkBlazePose
- BodyLandmarkEfficientNet
- BodyLandmarkMoveNet
- BodyLandmarkPoseNet
- Box
- Descriptor
- DrawOptions
- Emotion
- Events
- ExternalCanvas
- FaceGesture
- FaceLandmark
- Finger
- FingerCurl
- FingerDirection
- Gender
- GestureResult
- HandGesture
- HandType
- ImageObjects
- Input
- IrisGesture
- ObjectType
- Point
- Race
- TensorLike
- WarmupType

### Variables

- defaults
- env

## References

### default

Renames and re-exports Human

## Type aliases

### AnyCanvas

AnyCanvas: HTMLCanvasElement | OffscreenCanvas

- Defined in src/exports.ts:27

Defines all possible canvas types

### AnyImage

AnyImage: HTMLImageElement | typeof Image

- Defined in src/exports.ts:29

Defines all possible image types

### AnyVideo

AnyVideo: HTMLMediaElement | HTMLVideoElement

- Defined in src/exports.ts:31

Defines all possible video types

### BackendType

BackendType: ["cpu", "wasm", "webgl", "humangl", "tensorflow", "webgpu"]

- Defined in src/config.ts:199

Possible TensorFlow backends

### BodyAnnotation

BodyAnnotation: BodyAnnotationBlazePose | BodyAnnotationEfficientPose

- Defined in src/result.ts:83

### BodyAnnotationBlazePose

BodyAnnotationBlazePose: "leftLeg" | "rightLeg" | "torso" | "leftArm" | "rightArm" | "leftEye" | "rightEye" | "mouth"

- Defined in src/result.ts:81

### BodyAnnotationEfficientPose

BodyAnnotationEfficientPose: "leftLeg" | "rightLeg" | "torso" | "leftArm" | "rightArm" | "head"

- Defined in src/result.ts:82

### BodyGesture

BodyGesture: `leaning ${"left" | "right"}` | `raise ${"left" | "right"} hand` | "i give up"

- Defined in src/gesture/gesture.ts:22

body gesture type

### BodyLandmark

BodyLandmark: BodyLandmarkPoseNet | BodyLandmarkMoveNet | BodyLandmarkEfficientNet | BodyLandmarkBlazePose

- Defined in src/result.ts:80

### BodyLandmarkBlazePose

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"

- Defined in src/result.ts:77

### BodyLandmarkEfficientNet

BodyLandmarkEfficientNet: "head" | "neck" | "rightShoulder" | "rightElbow" | "rightWrist" | "chest" | "leftShoulder" | "leftElbow" | "leftWrist" | "bodyCenter" | "rightHip" | "rightKnee" | "rightAnkle" | "leftHip" | "leftKnee" | "leftAnkle"

- Defined in src/result.ts:76

### BodyLandmarkMoveNet

BodyLandmarkMoveNet: "nose" | "leftEye" | "rightEye" | "leftEar" | "rightEar" | "leftShoulder" | "rightShoulder" | "leftElbow" | "rightElbow" | "leftWrist" | "rightWrist" | "leftHip" | "rightHip" | "leftKnee" | "rightKnee" | "leftAnkle" | "rightAnkle"

- Defined in src/result.ts:75

### BodyLandmarkPoseNet

BodyLandmarkPoseNet: "nose" | "leftEye" | "rightEye" | "leftEar" | "rightEar" | "leftShoulder" | "rightShoulder" | "leftElbow" | "rightElbow" | "leftWrist" | "rightWrist" | "leftHip" | "rightHip" | "leftKnee" | "rightKnee" | "leftAnkle" | "rightAnkle"

- Defined in src/result.ts:74

### Box

Box: [number, number, number, number]

- Defined in src/result.ts:10

generic box as [x, y, width, height]

### Descriptor

Descriptor: number[]

- Defined in src/face/match.ts:2

Face descriptor type as number array

### DrawOptions

DrawOptions: { color: string; drawBoxes: boolean; drawGaze: boolean; drawGestures: boolean; drawLabels: boolean; drawPoints: boolean; drawPolygons: boolean; fillPolygons: boolean; font: string; labelColor: string; lineHeight: number; lineWidth: number; pointSize: number; roundRect: number; shadowColor: string; useCurves: boolean; useDepth: boolean }

- Defined in src/util/draw.ts:14

Draw Options

- Accessed via `human.draw.options` or provided per each draw method as the drawOptions optional parameter

#### Type declaration

- ##### color: string

  draw line color

- ##### drawBoxes: boolean

  should draw boxes around detection results?

- ##### drawGaze: boolean

  should draw gaze arrows?

- ##### drawGestures: boolean

  should detected gestures be drawn?

- ##### drawLabels: boolean

  should labels be drawn?

- ##### drawPoints: boolean

  should points be drawn?

- ##### drawPolygons: boolean

  should draw polygons from detection points?

- ##### fillPolygons: boolean

  should fill polygons?

- ##### font: string

  label font

- ##### labelColor: string

  label color

- ##### lineHeight: number

  line spacing between labels

- ##### lineWidth: number

  line width for drawn lines

- ##### pointSize: number

  size of drawn points

- ##### roundRect: number

  draw rounded boxes by n pixels

- ##### shadowColor: string

  label shadow color

- ##### useCurves: boolean

  should lines be curved?

- ##### useDepth: boolean

  use z-coordinate when available

### Emotion

Emotion: "angry" | "disgust" | "fear" | "happy" | "sad" | "surprise" | "neutral"

- Defined in src/result.ts:14

### Events

Events: "create" | "load" | "image" | "result" | "warmup" | "error"

- Defined in src/exports.ts:24

Events dispatched by `human.events`

- `create`: triggered when Human object is instantiated
- `load`: triggered when models are loaded (explicitly or on-demand)
- `image`: triggered when input image is processed
- `result`: triggered when detection is complete
- `warmup`: triggered when warmup is complete

### ExternalCanvas

ExternalCanvas: typeof Canvas

- Defined in src/exports.ts:35

Defines possible externally defined canvas

### FaceGesture

FaceGesture: `facing ${"left" | "center" | "right"}` | `blink ${"left" | "right"} eye` | `mouth ${number}% open` | `head ${"up" | "down"}`

- Defined in src/gesture/gesture.ts:9

face gesture type

### FaceLandmark

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"

- Defined in src/result.ts:17

### Finger

Finger: "index" | "middle" | "pinky" | "ring" | "thumb" | "palm"

- Defined in src/result.ts:116

### FingerCurl

FingerCurl: "none" | "half" | "full"

- Defined in src/result.ts:117

### FingerDirection

FingerDirection: "verticalUp" | "verticalDown" | "horizontalLeft" | "horizontalRight" | "diagonalUpRight" | "diagonalUpLeft" | "diagonalDownRight" | "diagonalDownLeft"

- Defined in src/result.ts:118

### Gender

Gender: "male" | "female" | "unknown"

- Defined in src/result.ts:15

### GestureResult

GestureResult: { face: number; gesture: FaceGesture } | { gesture: IrisGesture; iris: number } | { body: number; gesture: BodyGesture } | { gesture: HandGesture; hand: number }

- Defined in src/result.ts:172

Gesture combined results Each result has:

- part: part name and number where gesture was detected: `face`, `iris`, `body`, `hand`
- gesture: gesture detected

### HandGesture

HandGesture: `${"thumb" | "index" | "middle" | "ring" | "pinky"} forward` | `${"thumb" | "index" | "middle" | "ring" | "pinky"} up` | "victory" | "thumbs up"

- Defined in src/gesture/gesture.ts:28

hand gesture type

### HandType

HandType: "hand" | "fist" | "pinch" | "point" | "face" | "tip" | "pinchtip"

- Defined in src/result.ts:115

### ImageObjects

ImageObjects: ImageData | ImageBitmap

- Defined in src/exports.ts:33

Defines all possible image objects

### Input

Input: Tensor | AnyCanvas | AnyImage | AnyVideo | ImageObjects | ExternalCanvas

- Defined in src/exports.ts:37

Defines all possible input types for Human detection

### IrisGesture

IrisGesture: "facing center" | `looking ${"left" | "right" | "up" | "down"}` | "looking center"

- Defined in src/gesture/gesture.ts:16

iris gesture type

### ObjectType

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"

- Defined in src/result.ts:144

### Point

Point: [number, number, number?]

- Defined in src/result.ts:12

generic point as [x, y, z?]

### Race

Race: "white" | "black" | "asian" | "indian" | "other"

- Defined in src/result.ts:16

### TensorLike

TensorLike: TypedArray | number | boolean | string | RecursiveArray<number | number[] | TypedArray> | RecursiveArray<boolean> | RecursiveArray<string> | Uint8Array[]

- Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.14.0/node_modules/@tensorflow/tfjs-core/dist/types.d.ts:78

docalias

  TypedArray|Array

### WarmupType

WarmupType: ["" | "none" | "face" | "full" | "body"]

- Defined in src/config.ts:202

Possible values for `human.warmup`

## Variables

### Const defaults

defaults: Config = ...

- Defined in src/config.ts:299

- See all default Config values...

### Const env

env: Env = ...

- Defined in src/util/env.ts:175