update dependencies and refresh release

pull/356/head
Vladimir Mandic 2021-10-19 07:58:51 -04:00
parent 5ef6158cb1
commit 6a49230874
5 changed files with 22 additions and 35 deletions

View File

@ -1,4 +1,4 @@
# packageJson
#
Version: **undefined**
Description: **undefined**
@ -11,11 +11,10 @@
### **HEAD -> main** 2021/10/15 mandic00@live.com
- compress samples
- remove handdetect from default package
- remove posenet from default package
### **origin/main** 2021/10/14 mandic00@live.com
- enhanced movenet postprocessing
- use transferrable buffer for worker messages
- add optional anti-spoofing module
- add node-match advanced example using worker thread pool

13
TODO.md
View File

@ -2,10 +2,14 @@
## Work in Progress
- Switch to custom `tfjs` for main `human` ESM bundle
<br>
### Models
- Body segmentation: `robust-video-matting`
<br>
### Backends
@ -66,3 +70,12 @@ Object detection using CenterNet or NanoDet models is not working when using WAS
<https://github.com/tensorflow/tfjs/issues/5110>
- Backend WASM missing kernel op `SparseToDense`
<https://github.com/tensorflow/tfjs/issues/4824>
<br><hr><br>
## Pending Release
- Enhanced **MoveNet** post-processing
- Add optional **Anti-Spoof** module
- Remove old **HandDetect** and **PoseNet** models from default installation
- Refactor **ImageFX** module

View File

@ -155,8 +155,6 @@ async function runDetection() {
bench.begin();
}
const ctx = canvas.getContext('2d');
// const image = await human.image(video);
// ctx.drawImage(image.canvas, 0, 0, canvas.width, canvas.height);
ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
const imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);
if (!busy.face) {
@ -197,7 +195,6 @@ async function setupCamera() {
facingMode: 'user',
resizeMode: 'crop-and-scale',
width: { ideal: document.body.clientWidth },
// height: { ideal: document.body.clientHeight }, // not set as we're using aspectRation to get height instead
aspectRatio: document.body.clientWidth / document.body.clientHeight,
},
};

View File

@ -66,14 +66,14 @@
"@tensorflow/tfjs-layers": "^3.9.0",
"@tensorflow/tfjs-node": "^3.9.0",
"@tensorflow/tfjs-node-gpu": "^3.9.0",
"@types/node": "^16.10.9",
"@typescript-eslint/eslint-plugin": "^5.0.0",
"@typescript-eslint/parser": "^5.0.0",
"@vladmandic/build": "^0.6.0",
"@types/node": "^16.11.1",
"@typescript-eslint/eslint-plugin": "^5.1.0",
"@typescript-eslint/parser": "^5.1.0",
"@vladmandic/build": "^0.6.1",
"@vladmandic/pilogger": "^0.3.3",
"canvas": "^2.8.0",
"dayjs": "^1.10.7",
"esbuild": "^0.13.6",
"esbuild": "^0.13.8",
"eslint": "8.0.1",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-plugin-import": "^2.25.2",
@ -84,7 +84,7 @@
"rimraf": "^3.0.2",
"seedrandom": "^3.0.5",
"tslib": "^2.3.1",
"typedoc": "0.22.5",
"typedoc": "0.22.6",
"typescript": "4.4.4"
}
}

View File

@ -303,28 +303,6 @@ async function test(Human, inputConfig) {
if (!res || res?.hand?.length !== 1 || res?.hand[0]?.landmarks?.length > 0) log('error', 'failed: detectors result hand mismatch', res?.hand?.length);
else log('state', 'passed: detector result hand match');
// test posenet and movenet
log('info', 'test body variants');
config.body = { modelPath: 'posenet.json' };
res = await testDetect(human, 'samples/in/ai-body.jpg', 'posenet');
if (!res || res?.body?.length !== 1) log('error', 'failed: body posenet');
else log('state', 'passed: body posenet');
config.body = { modelPath: 'movenet-lightning.json' };
res = await testDetect(human, 'samples/in/ai-body.jpg', 'movenet');
if (!res || res?.body?.length !== 1) log('error', 'failed: body movenet');
else log('state', 'passed: body movenet');
// test handdetect and handtrack
log('info', 'test hand variants');
config.hand = { enabled: true, maxDetected: 2, minConfidence: 0.1, detector: { modelPath: 'handdetect.json' } };
res = await testDetect(human, 'samples/in/ai-body.jpg', 'handdetect');
if (!res || res?.hand?.length !== 2) log('error', 'failed: hand handdetect');
else log('state', 'passed: hand handdetect');
config.hand = { enabled: true, maxDetected: 2, minConfidence: 0.1, detector: { modelPath: 'handtrack.json' } };
res = await testDetect(human, 'samples/in/ai-body.jpg', 'handtrack');
if (!res || res?.hand?.length !== 2) log('error', 'failed: hand handdetect');
else log('state', 'passed: hand handdetect');
// test multiple instances
const first = new Human(config);
const second = new Human(config);