## Index

### References

- default

### Namespaces

- Tensor

### Classes

- Env
- Human
- Models
- Tensor

### Interfaces

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

### Type aliases

- AnyCanvas
- AnyImage
- AnyVideo
- BodyGesture
- Box
- Descriptor
- DrawOptions
- Error
- Events
- ExternalCanvas
- FaceGesture
- GestureResult
- HandGesture
- ImageObjects
- Input
- IrisGesture
- Point
- TensorFlow

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

### BodyGesture

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

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

### Box

Box: [number, number, number, number]

- Defined in src/result.ts:9

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

### Error

Error: { error: string }

- Defined in src/human.ts:50

Error message

#### Type declaration

- ##### error: string

  property

    error message

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

### GestureResult

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

- Defined in src/result.ts:139

Gesture combined results

### HandGesture

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

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

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

### Point

Point: [number, number, number?]

- Defined in src/result.ts:11

generic point as [x, y, z?]

### TensorFlow

TensorFlow: typeof tf

- Defined in src/human.ts:47

Instance of TensorFlow/JS used by Human

- Can be TFJS that is bundled with `Human` or a manually imported TFJS library

external

  API

## Variables

### defaults

defaults: Config = ...

- Defined in src/config.ts:269

- See all default Config values...

### env

env: Env = ...

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