update tfjs to 3.10.0

pull/280/head
Vladimir Mandic 2021-10-22 09:48:27 -04:00
parent 1680032088
commit fcd82fb07d
5 changed files with 28 additions and 45 deletions

View File

@ -9,11 +9,12 @@
## Changelog ## Changelog
### **HEAD -> main** 2021/10/21 mandic00@live.com
### **2.3.6** 2021/10/21 mandic00@live.com ### **2.3.6** 2021/10/21 mandic00@live.com
- fix for human.draw labels and typedefs
### **origin/main** 2021/10/21 mandic00@live.com
- refactor human.env to a class type - refactor human.env to a class type
- add human.custom.esm using custom tfjs build - add human.custom.esm using custom tfjs build

40
TODO.md
View File

@ -4,33 +4,19 @@
<br> <br>
### Models
- Body segmentation: `robust-video-matting`
<br>
### Backends
#### WASM
- Backend WASM incorrect handling of `int32` tensors
<https://github.com/tensorflow/tfjs/issues/5641>
#### WebGPU
Experimental support only until support is officially added in Chromium
- Performance issues:
<https://github.com/tensorflow/tfjs/issues/5689>
<br>
### Exploring ### Exploring
- Optical Flow: <https://docs.opencv.org/3.3.1/db/d7f/tutorial_js_lucas_kanade.html> - Optical Flow: <https://docs.opencv.org/3.3.1/db/d7f/tutorial_js_lucas_kanade.html>
- TFLite Models: <https://js.tensorflow.org/api_tflite/0.0.1-alpha.4/> - TFLite Models: <https://js.tensorflow.org/api_tflite/0.0.1-alpha.4/>
- Histogram Equalization: Regular, Adaptive, Contrast Limited - Histogram Equalization: Regular, Adaptive, Contrast Limited
- Switch to custom `tfjs` for main `human` ESM bundle - Switch to custom `tfjs` for main `human` ESM bundle
- Body segmentation: `robust-video-matting`
#### WebGPU
Experimental support only until support is officially added in Chromium
- Performance issues:
<https://github.com/tensorflow/tfjs/issues/5689>
<br><hr><br> <br><hr><br>
@ -43,14 +29,6 @@ Experimental support only until support is officially added in Chromium
Enhanced rotation correction for face detection is not working in NodeJS due to missing kernel op in TFJS Enhanced rotation correction for face detection is not working in NodeJS due to missing kernel op in TFJS
Feature is automatically disabled in NodeJS without user impact Feature is automatically disabled in NodeJS without user impact
- Backend NodeJS missing kernel op `RotateWithOffset`
<https://github.com/tensorflow/tfjs/issues/5473>
### Hand Detection
Enhanced rotation correction for hand detection is not working in NodeJS due to missing kernel op in TFJS
Feature is automatically disabled in NodeJS without user impact
- Backend NodeJS missing kernel op `RotateWithOffset` - Backend NodeJS missing kernel op `RotateWithOffset`
<https://github.com/tensorflow/tfjs/issues/5473> <https://github.com/tensorflow/tfjs/issues/5473>
@ -74,7 +52,11 @@ Object detection using CenterNet or NanoDet models is not working when using WAS
## Pending Release ## Pending Release
- Update to TFJS 3.10.0
- Multiple bug fixes
- Utility class `human.env`
- Enhanced **MoveNet** post-processing - Enhanced **MoveNet** post-processing
- Add optional **Anti-Spoof** module - Add optional **Anti-Spoof** module
- Remove old **HandDetect** and **PoseNet** models from default installation - Remove old **HandDetect** and **PoseNet** models from default installation
- Refactor **ImageFX** module - Refactor **ImageFX** module
- Experimental `human.custom.esm` with custom **TFJS** build

View File

@ -1016,6 +1016,7 @@ async function main() {
// create instance of human // create instance of human
human = new Human(userConfig); human = new Human(userConfig);
log('human version:', human.version); log('human version:', human.version);
// we've merged human defaults with user config and now lets store it back so it can be accessed by methods such as menu // we've merged human defaults with user config and now lets store it back so it can be accessed by methods such as menu
userConfig = human.config; userConfig = human.config;

View File

@ -1,6 +1,6 @@
{ {
"name": "@vladmandic/human", "name": "@vladmandic/human",
"version": "2.3.6", "version": "2.4.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", "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",
"sideEffects": false, "sideEffects": false,
"main": "dist/human.node.js", "main": "dist/human.node.js",
@ -55,18 +55,18 @@
"tensorflow" "tensorflow"
], ],
"devDependencies": { "devDependencies": {
"@tensorflow/tfjs": "^3.9.0", "@tensorflow/tfjs": "^3.10.0",
"@tensorflow/tfjs-backend-cpu": "^3.9.0", "@tensorflow/tfjs-backend-cpu": "^3.10.0",
"@tensorflow/tfjs-backend-wasm": "^3.9.0", "@tensorflow/tfjs-backend-wasm": "^3.10.0",
"@tensorflow/tfjs-backend-webgl": "^3.9.0", "@tensorflow/tfjs-backend-webgl": "^3.10.0",
"@tensorflow/tfjs-backend-webgpu": "^0.0.1-alpha.8", "@tensorflow/tfjs-backend-webgpu": "^0.0.1-alpha.8",
"@tensorflow/tfjs-converter": "^3.9.0", "@tensorflow/tfjs-converter": "^3.10.0",
"@tensorflow/tfjs-core": "^3.9.0", "@tensorflow/tfjs-core": "^3.10.0",
"@tensorflow/tfjs-data": "^3.9.0", "@tensorflow/tfjs-data": "^3.10.0",
"@tensorflow/tfjs-layers": "^3.9.0", "@tensorflow/tfjs-layers": "^3.10.0",
"@tensorflow/tfjs-node": "^3.9.0", "@tensorflow/tfjs-node": "^3.10.0",
"@tensorflow/tfjs-node-gpu": "^3.9.0", "@tensorflow/tfjs-node-gpu": "^3.10.0",
"@types/node": "^16.11.2", "@types/node": "^16.11.3",
"@typescript-eslint/eslint-plugin": "^5.1.0", "@typescript-eslint/eslint-plugin": "^5.1.0",
"@typescript-eslint/parser": "^5.1.0", "@typescript-eslint/parser": "^5.1.0",
"@vladmandic/build": "^0.6.2", "@vladmandic/build": "^0.6.2",

View File

@ -90,7 +90,6 @@
let res; let res;
let human = new Human(config); let human = new Human(config);
await human.init(); await human.init();
human.env.offscreen = false;
human.events.addEventListener('warmup', () => events('warmup')); human.events.addEventListener('warmup', () => events('warmup'));
human.events.addEventListener('image', () => events('image')); human.events.addEventListener('image', () => events('image'));
human.events.addEventListener('detect', () => events('detect')); human.events.addEventListener('detect', () => events('detect'));