Human library main class

All methods and properties are available only as members of Human class

- Configuration object definition: Config
- Results object definition: Result
- Possible inputs: Input

### Hierarchy

- Human

## Index

### Constructors

- constructor

### Properties

- classes
- config
- draw
- image
- models
- perf
- state
- sysinfo
- tf
- version

### Methods

- detect
- enhance
- load
- match
- profileData
- similarity
- warmup

## Constructors

### constructor

- new Human(userConfig?: Object | Config): Human

- #### Parameters

  - ##### userConfig: Object | Config = ...

  #### Returns Human

## Properties

### classes

classes: { age: __module; body: __module | __module; emotion: __module; facemesh: __module; faceres: __module; gender: __module; hand: __module; nanodet: __module }

#### Type declaration

- ##### age: __module

- ##### body: __module | __module

- ##### emotion: __module

- ##### facemesh: __module

- ##### faceres: __module

- ##### gender: __module

- ##### hand: __module

- ##### nanodet: __module

### config

config: Config

### draw

draw: { all: (inCanvas: HTMLCanvasElement, result: any) => Promise<void>; body: (inCanvas: HTMLCanvasElement, result: any[]) => Promise<void>; canvas: (inCanvas: HTMLCanvasElement, outCanvas: HTMLCanvasElement) => Promise<void>; drawOptions?: { bufferedOutput: Boolean; color: string; drawBoxes: 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; useRawBoxes: Boolean }; face: (inCanvas: HTMLCanvasElement, result: any[]) => Promise<void>; gesture: (inCanvas: HTMLCanvasElement, result: any[]) => Promise<void>; hand: (inCanvas: HTMLCanvasElement, result: any[]) => Promise<void> }

#### Type declaration

- ##### all: (inCanvas: HTMLCanvasElement, result: any) => Promise<void>

  - - (inCanvas: HTMLCanvasElement, result: any): Promise<void>

    - #### Parameters

      - ##### inCanvas: HTMLCanvasElement

      - ##### result: any

      #### Returns Promise<void>

- ##### body: (inCanvas: HTMLCanvasElement, result: any[]) => Promise<void>

  - - (inCanvas: HTMLCanvasElement, result: any[]): Promise<void>

    - #### Parameters

      - ##### inCanvas: HTMLCanvasElement

      - ##### result: any[]

      #### Returns Promise<void>

- ##### canvas: (inCanvas: HTMLCanvasElement, outCanvas: HTMLCanvasElement) => Promise<void>

  - - (inCanvas: HTMLCanvasElement, outCanvas: HTMLCanvasElement): Promise<void>

    - #### Parameters

      - ##### inCanvas: HTMLCanvasElement

      - ##### outCanvas: HTMLCanvasElement

      #### Returns Promise<void>

- ##### Optional drawOptions?: { bufferedOutput: Boolean; color: string; drawBoxes: 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; useRawBoxes: Boolean }

  - ##### bufferedOutput: Boolean

  - ##### color: string

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

  - ##### useRawBoxes: Boolean

- ##### face: (inCanvas: HTMLCanvasElement, result: any[]) => Promise<void>

  - - (inCanvas: HTMLCanvasElement, result: any[]): Promise<void>

    - #### Parameters

      - ##### inCanvas: HTMLCanvasElement

      - ##### result: any[]

      #### Returns Promise<void>

- ##### gesture: (inCanvas: HTMLCanvasElement, result: any[]) => Promise<void>

  - - (inCanvas: HTMLCanvasElement, result: any[]): Promise<void>

    - #### Parameters

      - ##### inCanvas: HTMLCanvasElement

      - ##### result: any[]

      #### Returns Promise<void>

- ##### hand: (inCanvas: HTMLCanvasElement, result: any[]) => Promise<void>

  - - (inCanvas: HTMLCanvasElement, result: any[]): Promise<void>

    - #### Parameters

      - ##### inCanvas: HTMLCanvasElement

      - ##### result: any[]

      #### Returns Promise<void>

### image

image: { canvas: HTMLCanvasElement | OffscreenCanvas; tensor: typeof __class }

#### Type declaration

- ##### canvas: HTMLCanvasElement | OffscreenCanvas

- ##### tensor: typeof __class

### models

models: { age: null | Object; blazepose: null | Object; efficientpose: null | Object; embedding: null | Object; emotion: null | Object; face: null | Object | MediaPipeFaceMesh; faceres: null | Object; gender: null | Object; handpose: null | HandPose; iris: null | Object; nanodet: null | Object; posenet: null | PoseNet }

#### Type declaration

- ##### age: null | Object

- ##### blazepose: null | Object

- ##### efficientpose: null | Object

- ##### embedding: null | Object

- ##### emotion: null | Object

- ##### face: null | Object | MediaPipeFaceMesh

- ##### faceres: null | Object

- ##### gender: null | Object

- ##### handpose: null | HandPose

- ##### iris: null | Object

- ##### nanodet: null | Object

- ##### posenet: null | PoseNet

### perf

perf: any

### state

state: string

### sysinfo

sysinfo: { agent: string; platform: string }

#### Type declaration

- ##### agent: string

- ##### platform: string

### tf

tf: __module

### version

version: string

## Methods

### detect

- detect(input: Input, userConfig?: Object | Config): Promise<Error | Result>

- #### Parameters

  - ##### input: Input

  - ##### userConfig: Object | Config = ...

  #### Returns Promise<Error | Result>

### enhance

- enhance(input: typeof __class): null | typeof __class

- #### Parameters

  - ##### input: typeof __class

  #### Returns null | typeof __class

### load

- load(userConfig?: Object | Config): Promise<void>

- #### Parameters

  - ##### userConfig: Object | Config = ...

  #### Returns Promise<void>

### match

- match(faceEmbedding: number[], db: { embedding: number[]; name: string; source: string }[], threshold?: number): { embedding: number[]; name: string; similarity: number; source: string }

- #### Parameters

  - ##### faceEmbedding: number[]

  - ##### db: { embedding: number[]; name: string; source: string }[]

  - ##### threshold: number = 0

  #### Returns { embedding: number[]; name: string; similarity: number; source: string }

  - ##### embedding: number[]

  - ##### name: string

  - ##### similarity: number

  - ##### source: string

### profileData

- profileData(): {} | { largestKernelOps: any; newBytes: any; newTensors: any; numKernelOps: any; peakBytes: any; slowestKernelOps: any; timeKernelOps: any }

- #### Returns {} | { largestKernelOps: any; newBytes: any; newTensors: any; numKernelOps: any; peakBytes: any; slowestKernelOps: any; timeKernelOps: any }

### similarity

- similarity(embedding1: number[], embedding2: number[]): number

- #### Parameters

  - ##### embedding1: number[]

  - ##### embedding2: number[]

  #### Returns number

### warmup

- warmup(userConfig?: Object | Config): Promise<Result | { error: any }>

- #### Parameters

  - ##### userConfig: Object | Config = ...

  #### Returns Promise<Result | { error: any }>