pull/97/head
Vladimir Mandic 2021-12-27 10:52:58 -05:00
parent 471ddb7549
commit 0de113080c
4 changed files with 38 additions and 35 deletions

View File

@ -9,7 +9,7 @@
## Changelog
### **HEAD -> master** 2021/12/09 mandic00@live.com
### **HEAD -> master** 2021/12/14 mandic00@live.com
### **1.6.1** 2021/12/09 mandic00@live.com

View File

@ -435,7 +435,7 @@ Build process uses `@vladmandic/build` module that creates optimized build for e
This is updated **face-api.js** with latest available TensorFlow/JS as the original is not compatible with **tfjs 2.0+**.
Forked from [face-api.js](https://github.com/justadudewhohacks/face-api.js) version **0.22.2** which was released on March 22nd, 2020
Currently based on **`TensorFlow/JS` 3.11.0**
Currently based on **`TensorFlow/JS` 3.12.0**
*Why?* I needed FaceAPI that does not cause version conflict with newer versions of TensorFlow
And since original FaceAPI was open-source, I've released this version as well
@ -459,6 +459,7 @@ but extends it with newer AI models, additional detection details, compatibility
Compared to [face-api.js](https://github.com/justadudewhohacks/face-api.js) version **0.22.2**:
- Compatible with `TensorFlow/JS 2.0+ & 3.0+`
Original `face-api.js` is based on `TFJS` **1.7.4**
- Compatible with `WebGL`, `CPU` and `WASM` TFJS Browser backends
- Compatible with both `tfjs-node` and `tfjs-node-gpu` TFJS NodeJS backends
- Updated all type castings for TypeScript type checking to `TypeScript 4.4`
@ -466,6 +467,8 @@ Compared to [face-api.js](https://github.com/justadudewhohacks/face-api.js) vers
Resulting code is optimized per-platform instead of being universal
Fully tree shakable when imported as an `ESM` module
Browser bundle process uses `ESBuild` instead of `Rollup`
- Added separate `face-api` versions with `tfjs` pre-bundled and without `tfjs`
When using `-nobundle` version, user can load any version of `tfjs` manually
- Typescript build process now targets `ES2018` and instead of dual `ES5`/`ES6`
Resulting code is clean ES2018 JavaScript without polyfills
- Removed old tests, docs, examples

View File

@ -108,7 +108,7 @@ async function main() {
const params = new URLSearchParams(location.search);
if (params.has('backend')) {
const backend = params.get('backend');
await faceapi.tf.setWasmPaths('https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm@3.11.0/dist/');
await faceapi.tf.setWasmPaths('https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm@3.12.0/dist/');
log(`Chosen backend: ${backend}`);
await faceapi.tf.setBackend(backend);
} else {

View File

@ -43,6 +43,7 @@
"devDependencies": {
"@canvas/image": "^1.0.1",
"@microsoft/api-extractor": "^7.19.2",
"@tensorflow/tfjs": "^3.12.0",
"@tensorflow/tfjs-backend-cpu": "^3.12.0",
"@tensorflow/tfjs-backend-wasm": "^3.12.0",
"@tensorflow/tfjs-backend-webgl": "^3.12.0",
@ -51,26 +52,25 @@
"@tensorflow/tfjs-core": "^3.12.0",
"@tensorflow/tfjs-data": "^3.12.0",
"@tensorflow/tfjs-layers": "^3.12.0",
"@tensorflow/tfjs-node-gpu": "^3.12.0",
"@tensorflow/tfjs-node": "^3.12.0",
"@tensorflow/tfjs": "^3.12.0",
"@types/node": "^16.11.12",
"@tensorflow/tfjs-node-gpu": "^3.12.0",
"@types/node": "^17.0.5",
"@types/offscreencanvas": "^2019.6.4",
"@typescript-eslint/eslint-plugin": "^5.7.0",
"@typescript-eslint/parser": "^5.7.0",
"@typescript-eslint/eslint-plugin": "^5.8.0",
"@typescript-eslint/parser": "^5.8.0",
"@vladmandic/build": "^0.6.6",
"@vladmandic/pilogger": "^0.3.5",
"@vladmandic/pilogger": "^0.4.2",
"@vladmandic/tfjs": "github:vladmandic/tfjs",
"canvas": "^2.8.0",
"chokidar": "^3.5.2",
"dayjs": "^1.10.7",
"esbuild": "^0.14.3",
"esbuild": "^0.14.8",
"eslint": "^8.5.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-json": "^3.1.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.2.0",
"eslint": "^8.4.1",
"eslint-plugin-promise": "^6.0.0",
"node-fetch": "^3.1.0",
"rimraf": "^3.0.2",
"seedrandom": "^3.0.5",