diff --git a/Configuration.md b/Configuration.md
index c46917f..30b1d7d 100644
--- a/Configuration.md
+++ b/Configuration.md
@@ -36,19 +36,13 @@ All configuration details can be changed in real-time!
```js
const config: Config = {
- backend: 'webgl', // select tfjs backend to use
+ backend: 'webgl', // select tfjs backend to use, leave empty to use default backend
// can be 'webgl', 'wasm', 'cpu', or 'humangl' which is a custom version of webgl
- // leave as empty string to continue using default backend
- // when backend is set outside of Human library
modelBasePath: '../models/', // base path for all models
- wasmPath: '../assets/', // path for wasm binaries
- // only used for backend: wasm
+ wasmPath: '../node_modules/@tensorflow/tfjs-backend-wasm/dist//', // path for wasm binaries, only used for backend: wasm
debug: true, // print additional status messages to console
async: true, // execute enabled models in parallel
- // this disables per-model performance data but
- // slightly increases performance
- // cannot be used if profiling is enabled
- warmup: 'face', // what to use for human.warmup(), can be 'none', 'face', 'full'
+ warmup: 'full', // what to use for human.warmup(), can be 'none', 'face', 'full'
// warmup pre-initializes all models for faster inference but can take
// significant time on startup
// only used for `webgl` and `humangl` backends
@@ -81,7 +75,7 @@ const config: Config = {
},
gesture: {
- enabled: true, // enable simple gesture recognition
+ enabled: true, // enable gesture recognition based on model results
},
face: {
@@ -96,13 +90,11 @@ const config: Config = {
// this parameter is not valid in nodejs
maxDetected: 10, // maximum number of faces detected in the input
// should be set to the minimum number for performance
- skipFrames: 21, // how many frames to go without re-running the face bounding box detector
- // only used for video inputs
+ skipFrames: 21, // how many max frames to go without re-running the face bounding box detector
+ // only used when cacheSensitivity is not zero
// e.g., if model is running st 25 FPS, we can re-use existing bounding
// box for updated face analysis as the head probably hasn't moved much
// in short time (10 * 1/25 = 0.25 sec)
- skipInitial: false, // if previous detection resulted in no faces detected,
- // should skipFrames be reset immediately to force new detection cycle
minConfidence: 0.2, // threshold for discarding a prediction
iouThreshold: 0.1, // ammount of overlap between two detected objects before one object is removed
return: false, // return extracted face as tensor
@@ -124,15 +116,16 @@ const config: Config = {
// recommended to enable detector.rotation and mesh.enabled
modelPath: 'faceres.json', // face description model
// can be either absolute path or relative to modelBasePath
- skipFrames: 31, // how many frames to go without re-running the detector
- // only used for video inputs
+ skipFrames: 31, // how many max frames to go without re-running the detector
+ // only used when cacheSensitivity is not zero
minConfidence: 0.1, // threshold for discarding a prediction
},
emotion: {
enabled: true,
minConfidence: 0.1, // threshold for discarding a prediction
- skipFrames: 32, // how many frames to go without re-running the detector
+ skipFrames: 32, // how max many frames to go without re-running the detector
+ // only used when cacheSensitivity is not zero
modelPath: 'emotion.json', // face emotion model, can be absolute path or relative to modelBasePath
},
},
@@ -144,23 +137,21 @@ const config: Config = {
maxDetected: 1, // maximum number of people detected in the input
// should be set to the minimum number for performance
// only valid for posenet as blazepose only detects single pose
- minConfidence: 0.2, // threshold for discarding a prediction
+ minConfidence: 0.1, // threshold for discarding a prediction
},
hand: {
enabled: true,
rotation: false, // use best-guess rotated hand image or just box with rotation as-is
// false means higher performance, but incorrect finger mapping if hand is inverted
- skipFrames: 12, // how many frames to go without re-running the hand bounding box detector
- // only used for video inputs
+ skipFrames: 32, // how many max frames to go without re-running the hand bounding box detector
+ // only used when cacheSensitivity is not zero
// e.g., if model is running st 25 FPS, we can re-use existing bounding
// box for updated hand skeleton analysis as the hand probably
// hasn't moved much in short time (10 * 1/25 = 0.25 sec)
- skipInitial: false, // if previous detection resulted in no hands detected,
- // should skipFrames be reset immediately to force new detection cycle
minConfidence: 0.1, // threshold for discarding a prediction
iouThreshold: 0.1, // ammount of overlap between two detected objects before one object is removed
- maxDetected: 1, // maximum number of hands detected in the input
+ maxDetected: 2, // maximum number of hands detected in the input
// should be set to the minimum number for performance
landmarks: true, // detect hand landmarks or just hand boundary box
detector: {
@@ -173,14 +164,15 @@ const config: Config = {
object: {
enabled: false,
- modelPath: 'nanodet.json', // experimental: object detection model, can be absolute path or relative to modelBasePath
+ modelPath: 'mb3-centernet.json', // experimental: object detection model, can be absolute path or relative to modelBasePath
+ // can be 'mb3-centernet' or 'nanodet'
minConfidence: 0.2, // threshold for discarding a prediction
iouThreshold: 0.4, // ammount of overlap between two detected objects before one object is removed
maxDetected: 10, // maximum number of objects detected in the input
- skipFrames: 41, // how many frames to go without re-running the detector
+ skipFrames: 41, // how many max frames to go without re-running the detector
+ // only used when cacheSensitivity is not zero
},
};
-export { config as defaults };
```
diff --git a/Models.md b/Models.md
index e5eb6f9..64a747a 100644
--- a/Models.md
+++ b/Models.md
@@ -11,7 +11,7 @@ Default models in Human library are:
- **Emotion Detection**: Oarriaga Emotion
- **Body Analysis**: PoseNet (AtomicBits version MNv2-075-16)
- **Hand Analysis**: MediaPipe Hands
-- **Object Detection**: NanoDet
+- **Object Detection**: MobileNet-v3 with CenterNet
## Notes
@@ -52,7 +52,8 @@ Default models in Human library are:
| Sirius-AI MobileFaceNet | 125K | mobilefacenet.json | 5.0M | mobilefacenet.bin | 139 |
| BecauseofAI MobileFace | 33K | mobileface.json | 2.1M | mobileface.bin | 75 |
| FaceBoxes | 212K | faceboxes.json | 2.0M | faceboxes.bin | N/A |
-| NanoDet | 255K | nanodet.json | 1.9M | nanodet.bin | 524 |
+| NanoDet | 255K | nanodet.json | 7.3M | nanodet.bin | 229 |
+| MB3-CenterNet | 197K | nanodet.json | 1.9M | nanodet.bin | 267 |
| FaceRes | 70K | faceres.json | 6.7M | faceres.bin | 524 |
@@ -74,6 +75,7 @@ Default models in Human library are:
- Emotion Prediction: [**Oarriaga**](https://github.com/oarriaga/face_classification)
- Face Embedding: [**BecauseofAI MobileFace**](https://github.com/becauseofAI/MobileFace)
- ObjectDetection: [**NanoDet**](https://github.com/RangiLyu/nanodet)
+- ObjectDetection: [**MB3-CenterNet**](https://github.com/610265158/mobilenetv3_centernet)
- Image Filters: [**WebGLImageFilter**](https://github.com/phoboslab/WebGLImageFilter)
- Pinto Model Zoo: [**Pinto**](https://github.com/PINTO0309/PINTO_model_zoo)