diff --git a/CHANGELOG.md b/CHANGELOG.md index 85004d7d..096e14f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # @vladmandic/human -Version: **1.7.0** +Version: **1.7.1** 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 ** @@ -9,8 +9,13 @@ Repository: **** ## Changelog -### **HEAD -> main** 2021/04/24 mandic00@live.com +### **1.7.1** 2021/04/25 mandic00@live.com + +### **origin/main** 2021/04/24 mandic00@live.com + +- enable cross origin isolation +- rewrite posenet decoder - remove efficientpose - major version rebuild diff --git a/src/human.ts b/src/human.ts index d554a8fd..b5db9c67 100644 --- a/src/human.ts +++ b/src/human.ts @@ -304,6 +304,9 @@ export class Human { */ if (this.config.backend && this.config.backend.length > 0) { + // @ts-ignore ignore missing type for WorkerGlobalScope as that is the point + if (typeof window === 'undefined' && typeof WorkerGlobalScope !== 'undefined' && this.config.debug) log('running inside web worker'); + // force browser vs node backend if (this.tf.ENV.flags.IS_BROWSER && this.config.backend === 'tensorflow') this.config.backend = 'webgl'; if (this.tf.ENV.flags.IS_NODE && (this.config.backend === 'webgl' || this.config.backend === 'humangl')) this.config.backend = 'tensorflow'; @@ -378,9 +381,10 @@ export class Human { if (this.config.scoped) this.tf.engine().startScope(); this.analyze('Start Scope:'); - // disable video optimization for inputs of type image + // disable video optimization for inputs of type image, but skip if inside worker thread let previousVideoOptimized; - if (input && this.config.videoOptimized && ( + // @ts-ignore ignore missing type for WorkerGlobalScope as that is the point + if (input && this.config.videoOptimized && (typeof window !== 'undefined') && (typeof WorkerGlobalScope !== 'undefined') && ( (typeof HTMLImageElement !== 'undefined' && input instanceof HTMLImageElement) || (typeof Image !== 'undefined' && input instanceof Image) || (typeof ImageData !== 'undefined' && input instanceof ImageData) diff --git a/wiki b/wiki index e06119f8..3b81af15 160000 --- a/wiki +++ b/wiki @@ -1 +1 @@ -Subproject commit e06119f8538250b84e4ff4caed40746b749a3531 +Subproject commit 3b81af15f2560de5c06f20cbd8de57caf62682f2