From 7c993608b2f9c21c6b8926d934812187ab528c4b Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Mon, 12 Oct 2020 11:19:52 -0400 Subject: [PATCH] updated linting --- README.md | 29 +++++++++++++++++++++++++---- package.json | 1 + 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 29cd2e2f..7138f766 100644 --- a/README.md +++ b/README.md @@ -212,7 +212,7 @@ result = { { confidence: // box: // - mesh: // (468 base points & 10 iris points) + mesh: // (468 base points & 10 iris points) annotations: // (32 base annotated landmarks & 2 iris annotations) iris: // (relative distance of iris to camera, multiple by focal lenght to get actual distance) age: // (estimated age) @@ -223,7 +223,7 @@ result = { [ { score: // , - keypoints: // (17 annotated landmarks) + keypoints: // (17 annotated landmarks) } ], hand: // @@ -231,8 +231,8 @@ result = { { confidence: // , box: // , - landmarks: // (21 points) - annotations: // ]> (5 annotated landmakrs) + landmarks: // (21 points) + annotations: // ]> (5 annotated landmakrs) } ] } @@ -240,10 +240,31 @@ result = {
+## Build + +If you want to modify the library and perform a full rebuild: +*clone repository, install dependencies, check for errors and run full rebuild from which creates bundles from `/src` into `/dist`:* + +```shell +git clone https://github.com/vladmandic/human +cd human +npm install # installs all project dependencies +npm run lint +npm run build +``` + +Project is written in pure `JavaScript`, [ECMAScript version 2020](https://www.ecma-international.org/ecma-262/11.0/index.html) + +Only project depdendency is [@tensorflow/tfjs](https://github.com/tensorflow/tfjs), the rest are devDependencies tools: [eslint](https://github.com/eslint) used for linting and [esbuild](https://github.com/evanw/esbuild) used for bundling + +
+ ## Performance Performance will vary depending on your hardware, but also on number of resolution of input video/image, enabled modules as well as their parameters + For example, on a desktop with a low-end nVidia GTX1050 it can perform multiple face detections at 50+ FPS, but drops to 5-10 FPS on a medium complex images if all modules are enabled + Library can also be used on mobile devices
diff --git a/package.json b/package.json index 71e9d257..e21658b8 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "rimraf": "^3.0.2" }, "scripts": { + "lint": "eslint src/*", "build": "rimraf dist/ && npm run build-esm && npm run build-iife", "build-esm": "esbuild --bundle --platform=browser --sourcemap --target=esnext --format=esm --minify --outfile=dist/human.esm.js src/index.js", "build-iife": "esbuild --bundle --platform=browser --sourcemap --target=esnext --format=iife --minify --global-name=human --outfile=dist/human.js src/index.js"