diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a926e08..a4be4e0b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/TODO.md b/TODO.md index 78433d4b..94a81474 100644 --- a/TODO.md +++ b/TODO.md @@ -2,10 +2,14 @@ ## Work in Progress +- Switch to custom `tfjs` for main `human` ESM bundle +
### Models +- Body segmentation: `robust-video-matting` +
### Backends @@ -66,3 +70,12 @@ Object detection using CenterNet or NanoDet models is not working when using WAS - Backend WASM missing kernel op `SparseToDense` + +


+ +## Pending Release + +- Enhanced **MoveNet** post-processing +- Add optional **Anti-Spoof** module +- Remove old **HandDetect** and **PoseNet** models from default installation +- Refactor **ImageFX** module diff --git a/demo/multithread/index.js b/demo/multithread/index.js index 2ffd6c64..e63b77ba 100644 --- a/demo/multithread/index.js +++ b/demo/multithread/index.js @@ -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, }, }; diff --git a/package.json b/package.json index c20a9a2a..6f088960 100644 --- a/package.json +++ b/package.json @@ -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" } } diff --git a/test/test-main.js b/test/test-main.js index 51db904f..7cacb83e 100644 --- a/test/test-main.js +++ b/test/test-main.js @@ -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);