# Interface Config

Configuration interface definition for Human library Contains all configurable parameters Defaults: config

interface Config {
async : boolean;
backend : BackendEnum ;
body : Partial< BodyConfig >;
cacheModels : boolean;
cacheSensitivity : number;
deallocate : boolean;
debug : boolean;
face : Partial< FaceConfig >;
filter : Partial< FilterConfig >;
flags : Record<string, unknown>;
gesture : Partial< GestureConfig >;
hand : Partial< HandConfig >;
modelBasePath : string;
object : Partial< ObjectConfig >;
segmentation : Partial< SegmentationConfig >;
skipAllowed : boolean;
softwareKernels : boolean;
validateModels : boolean;
warmup : WarmupEnum ;
wasmPath : string;
wasmPlatformFetch : boolean;
}

- Defined in src/config.ts:238

##### Index

### Properties

async
backend
body
cacheModels
cacheSensitivity
deallocate
debug
face
filter
flags
gesture
hand
modelBasePath
object
segmentation
skipAllowed
softwareKernels
validateModels
warmup
wasmPath
wasmPlatformFetch

## Properties

### async

async: boolean

Perform model loading and inference concurrently or sequentially

default: `true`

- Defined in src/config.ts:269

### backend

backend: BackendEnum

Backend used for TFJS operations valid build-in backends are:

- Browser: `cpu`, `wasm`, `webgl`, `humangl`, `webgpu`
- NodeJS: `cpu`, `wasm`, `tensorflow` default: `webgl` for browser and `tensorflow` for nodejs

- Defined in src/config.ts:245

### body

body: Partial< BodyConfig >

Body config BodyConfig

- Defined in src/config.ts:329

### cacheModels

cacheModels: boolean

Cache models in IndexDB on first sucessfull load default: true if indexdb is available (browsers), false if its not (nodejs)

- Defined in src/config.ts:289

### cacheSensitivity

cacheSensitivity: number

Cache sensitivity

- values 0..1 where 0.01 means reset cache if input changed more than 1%
- set to 0 to disable caching

default: 0.7

- Defined in src/config.ts:303

### deallocate

deallocate: boolean

Perform immediate garbage collection on deallocated tensors instead of caching them

- Defined in src/config.ts:314

### debug

debug: boolean

Print debug statements to console

default: `true`

- Defined in src/config.ts:263

### face

face: Partial< FaceConfig >

Face config FaceConfig

- Defined in src/config.ts:326

### filter

filter: Partial< FilterConfig >

Filter config FilterConfig

- Defined in src/config.ts:320

### flags

flags: Record<string, unknown>

Explicit flags passed to initialize TFJS

- Defined in src/config.ts:306

### gesture

gesture: Partial< GestureConfig >

Gesture config GestureConfig

- Defined in src/config.ts:323

### hand

hand: Partial< HandConfig >

Hand config HandConfig

- Defined in src/config.ts:332

### modelBasePath

modelBasePath: string

Base model path (typically starting with file://, http:// or https://) for all models

- individual modelPath values are relative to this path

default: `../models/` for browsers and `file://models/` for nodejs

- Defined in src/config.ts:284

### object

object: Partial< ObjectConfig >

Object config ObjectConfig

- Defined in src/config.ts:335

### segmentation

segmentation: Partial< SegmentationConfig >

Segmentation config SegmentationConfig

- Defined in src/config.ts:338

### skipAllowed

skipAllowed: boolean

Internal Variable

- Defined in src/config.ts:317

### softwareKernels

softwareKernels: boolean

Software Kernels Registers software kernel ops running on CPU when accelerated version of kernel is not found in the current backend

- Defined in src/config.ts:311

### validateModels

validateModels: boolean

Validate kernel ops used in model during model load default: true any errors will be printed on console but will be treated as non-fatal

- Defined in src/config.ts:295

### warmup

warmup: WarmupEnum

What to use for `human.warmup()`

- warmup pre-initializes all models for faster inference but can take significant time on startup
- used by `webgl`, `humangl` and `webgpu` backends

default: `full`

- Defined in src/config.ts:277

### wasmPath

wasmPath: string

Path to *.wasm files if backend is set to `wasm`

default: auto-detects to link to CDN `jsdelivr` when running in browser

- Defined in src/config.ts:251

### wasmPlatformFetch

wasmPlatformFetch: boolean

Force WASM loader to use platform fetch

default: false

- Defined in src/config.ts:257