caching determination is now dynamic based on detection of input change and not based on input types

pull/280/head
Vladimir Mandic 2021-05-18 11:36:24 -04:00
parent 8741695dbd
commit 956e4743c7
4 changed files with 10 additions and 7 deletions

View File

@ -1,6 +1,6 @@
# @vladmandic/human
Version: **1.8.5**
Version: **1.9.0**
Description: **Human: AI-powered 3D Face Detection & Rotation Tracking, Face Description & Recognition, Body Pose Tracking, 3D Hand & Finger Tracking, Iris Analysis, Age & Gender & Emotion Prediction, Gesture Recognition**
Author: **Vladimir Mandic <mandic00@live.com>**
@ -9,11 +9,14 @@ Repository: **<git+https://github.com/vladmandic/human.git>**
## Changelog
### **human 1.9.0 beta with breaking changes regarding caching** 2021/05/18 mandic00@live.com
### **origin/main** 2021/05/18 mandic00@live.com
### **1.8.5** 2021/05/18 mandic00@live.com
### **origin/main** 2021/05/17 mandic00@live.com
- add node-video sample
- add node-webcam demo
- fix node build and update model signatures

View File

@ -201,7 +201,7 @@ const config: Config = {
// warmup pre-initializes all models for faster inference but can take
// significant time on startup
// only used for `webgl` and `humangl` backends
cacheSensitivity: 0.005, // cache sensitivity
cacheSensitivity: 0.004, // cache sensitivity
// values 0..1 where 0.01 means reset cache if input changed more than 1%
// set to 0 to disable caching
filter: { // run input through image filters before inference

View File

@ -344,7 +344,7 @@ export class Human {
/** @hidden */
#skipFrame = async (input) => {
if (this.config.cacheSensitivity === 0) return true;
const resizeFact = 32;
const resizeFact = 50;
const reduced = input.resizeBilinear([Math.trunc(input.shape[1] / resizeFact), Math.trunc(input.shape[2] / resizeFact)]);
const sumT = this.tf.sum(reduced);
reduced.dispose();

2
wiki

@ -1 +1 @@
Subproject commit 3030450d4a177092285d73d313a3efc7c5d8a966
Subproject commit 534d4d77d99b0fc71913e8ef6242e4c6461614f5