-
-
Notifications
You must be signed in to change notification settings - Fork 326
Config
Vladimir Mandic edited this page Aug 5, 2023
·
4 revisions
Human
configuration is a simple object that can be passed as a constructor and overriden during any human.detect()
call
- Configuration Interface Specification
- Configuration Interface Definition
- Default configuration values
Overview of Config
object type:
interface Config {
backend: string // backend engine to be used for processing
wasmPath: string, // root download path for wasm binaries
debug: boolean, // verbose messages to console
async: boolean, // use asynchronous processing within human
warmup: string, // optional warmup of backend engine
modelBasePath: string, // root download path for all models
cacheSensitivity: number; // threshold for result cache validation
skipAllowed: boolean; // *internal* set after cache validation check
filter: FilterConfig, // controls input pre-processing
face: FaceConfig, // controls face detection and all modules that rely on detected face
body: BodyConfig, // controls body pose detection
hand: HandConfig, // contros hand and finger detection
object: ObjectConfig, // controls object detection
gesture: GestureConfig; // controls gesture analysis
segmentation: SegmentationConfig, // controls body segmentation
}
Most of configuration options are exposed in the demo
application UI:
Configuration object is large, but typically you only need to modify few values:
-
enabled
: Choose which models to use -
modelBasePath
: Update as needed to reflect your application's relative path
for example,
const myConfig = {
modelBasePath: 'https://cdn.jsdelivr.net/npm/@vladmandic/human/models/',
segmentation: { enabled: true },
};
const human = new Human(myConfig);
const result = await human.detect(input);
Human Library Wiki Pages
3D Face Detection, Body Pose, Hand & Finger Tracking, Iris Tracking, Age & Gender Prediction, Emotion Prediction & Gesture Recognition