## 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
- BodyGesture
- Box
- Descriptor
- DrawOptions
- Events
- ExternalCanvas
- FaceGesture
- GestureResult
- HandGesture
- ImageObjects
- Input
- IrisGesture
- Point
- TensorLike
- WarmupType

### Variables

- defaults
- env

## References

### default

Renames and re-exports Human

## Type aliases

### AnyCanvas

AnyCanvas: HTMLCanvasElement | OffscreenCanvas

- Defined in src/exports.ts:26

Defines all possible canvas types

### AnyImage

AnyImage: HTMLImageElement | typeof Image

- Defined in src/exports.ts:28

Defines all possible image types

### AnyVideo

AnyVideo: HTMLMediaElement | HTMLVideoElement

- Defined in src/exports.ts:30

Defines all possible video types

### BackendType

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

- Defined in src/config.ts:200

Possible TensorFlow backends

### BodyGesture

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

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

body gesture type

### 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

### Events

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

- Defined in src/exports.ts:23

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:34

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

### GestureResult

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

- Defined in src/result.ts:144

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

### ImageObjects

ImageObjects: ImageData | ImageBitmap

- Defined in src/exports.ts:32

Defines all possible image objects

### Input

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

- Defined in src/exports.ts:36

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

### Point

Point: [number, number, number?]

- Defined in src/result.ts:12

generic point as [x, y, z?]

### TensorLike

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

- Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.11.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:203

Possible values for `human.warmup`

## Variables

### defaults

defaults: Config = ...

- Defined in src/config.ts:290

- See all default Config values...

### env

env: Env = ...

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