From 5dcbe8ad56fc4dc21378046c225185e6203250eb Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Thu, 12 Nov 2020 09:21:07 -0500 Subject: [PATCH] updated demos documentation --- Demos.md | 20 ++++++++++++++++++++ Usage.md | 1 + 2 files changed, 21 insertions(+) diff --git a/Demos.md b/Demos.md index 495f724..651bfc9 100644 --- a/Demos.md +++ b/Demos.md @@ -21,6 +21,26 @@ If your target is desktop, alternatively you can load `demo/browser.js` directly
+### Demo Options + +Demo implements several ways to use `Human` library, +all configurable in `browse.js:ui` configuration object and in the UI itself: + +- `ui.buffered`: run detection and screen refresh in a sequence or as separate buffered functions +- `ui.bufferedFPSTarget`: when using buffered execution this target fps for screen refresh +- `ui.useWorker`: run processing in main thread or dedicated web worker thread +- `ui.crop`: resize camera input to fit screen or run at native resolution +- `ui.facing`: use front or back camera if device has multiple cameras +- `ui.modelsPreload`: pre-load all enabled models on page load +- `ui.modelsWarmup`: warmup all loaded models on page load +- `ui.useDepth`: draw points and polygons with different shade depending on detected Z-axis depth +- `ui.drawBoxes`: draw bounding boxes around detected objects (e.g. face) +- `ui.drawPoints`: draw each deteced point as point cloud +- `ui.drawPolygons`: connect detected points with polygons +- `ui.fillPolygons`: fill drawn polygons + +
+ ### Dev Server To use dev server, you must have an SSL certificate since browsers enforce *https* for webcam access diff --git a/Usage.md b/Usage.md index 2b1cd42..014cfba 100644 --- a/Usage.md +++ b/Usage.md @@ -34,6 +34,7 @@ Additionally, `Human` library exposes several objects and methods: // progresses through: 'config', 'check', 'backend', 'load', 'run:', 'idle' human.load(config) // explicitly call load method that loads configured models // if you want to pre-load them instead of on-demand loading during 'human.detect()' + human.image(image, config?) // runs image processing without detection and returns canvas ```