{"_id":"@tensorflow-models/handpose","_rev":"2997138","name":"@tensorflow-models/handpose","description":"Pretrained hand detection model","dist-tags":{"latest":"0.1.0"},"maintainers":[{"name":"annxingyuan","email":""},{"name":"caisq","email":""},{"name":"dedongala","email":""},{"name":"fengwuyao","email":""},{"name":"jinjingforever","email":""},{"name":"linazhao128","email":""},{"name":"linchan","email":""},{"name":"mattsoulanille","email":""},{"name":"pyu10055","email":""}],"time":{"modified":"2023-08-29T08:35:11.000Z","created":"2020-03-07T17:56:05.454Z","0.1.0":"2023-08-08T17:36:45.791Z","0.0.7":"2021-02-10T01:43:42.951Z","0.0.6":"2020-08-10T13:46:17.995Z","0.0.5":"2020-06-18T18:53:15.429Z","0.0.4":"2020-05-19T17:51:42.928Z","0.0.3":"2020-03-11T13:37:28.603Z","0.0.2":"2020-03-07T17:56:05.454Z"},"users":{},"repository":{"type":"git","url":"git+https://github.com/tensorflow/tfjs-models.git"},"versions":{"0.1.0":{"name":"@tensorflow-models/handpose","version":"0.1.0","description":"Pretrained hand detection model","main":"dist/index.js","jsnext:main":"dist/handpose.esm.js","module":"dist/handpose.esm.js","unpkg":"dist/handpose.min.js","jsdelivr":"dist/handpose.min.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/tensorflow/tfjs-models.git"},"peerDependencies":{"@tensorflow/tfjs-backend-webgl":"^4.10.0","@tensorflow/tfjs-converter":"^4.10.0","@tensorflow/tfjs-core":"^4.10.0"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@rollup/plugin-typescript":"^3.0.0","@tensorflow/tfjs-backend-cpu":"^4.10.0","@tensorflow/tfjs-backend-webgl":"^4.10.0","@tensorflow/tfjs-converter":"^4.10.0","@tensorflow/tfjs-core":"^4.10.0","@types/jasmine":"~2.8.8","babel-core":"~6.26.0","babel-plugin-transform-runtime":"~6.23.0","jasmine-core":"~3.5.0","rollup":"~2.3.2","rollup-plugin-terser":"~7.0.2","rollup-plugin-visualizer":"~3.3.2","ts-node":"~8.8.2","tslint":"~5.18.0","typescript":"~5.1.6","yalc":"~1.0.0-pre.21"},"scripts":{"bundle":"rollup -c","build":"rimraf dist && tsc && yarn bundle","publish-local":"yarn build && rollup -c && yalc publish","test":"ts-node --skip-ignore --project tsconfig.test.json run_tests.ts","build-npm":"yarn build && yarn bundle","lint":"tslint -p . -t verbose","publish-demo":"./scripts/publish-demo.sh"},"license":"Apache-2.0","dependencies":{"rimraf":"^3.0.2","tslib":"^2.6.1"},"_id":"@tensorflow-models/handpose@0.1.0","gitHead":"ce1c9c1b019faf9eb93f31e163d0fcc632090ff6","bugs":{"url":"https://github.com/tensorflow/tfjs-models/issues"},"homepage":"https://github.com/tensorflow/tfjs-models#readme","_nodeVersion":"20.5.0","_npmVersion":"9.8.0","dist":{"shasum":"9b1cc8997cb1dcb2c60918adbc4c5f25a1fdf4f4","size":35904,"noattachment":false,"key":"/@tensorflow-models/handpose/-/@tensorflow-models/handpose-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@tensorflow-models/handpose/download/@tensorflow-models/handpose-0.1.0.tgz"},"_npmUser":{"name":"fengwuyao","email":"yaofengwu123@gmail.com"},"directories":{},"maintainers":[{"name":"annxingyuan","email":""},{"name":"caisq","email":""},{"name":"dedongala","email":""},{"name":"fengwuyao","email":""},{"name":"jinjingforever","email":""},{"name":"linazhao128","email":""},{"name":"linchan","email":""},{"name":"mattsoulanille","email":""},{"name":"pyu10055","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/handpose_0.1.0_1691516205573_0.42425814690614616"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-08-08T17:36:45.791Z","publish_time":1691516205791,"_source_registry_name":"default","_cnpm_publish_time":1691516205791},"0.0.7":{"name":"@tensorflow-models/handpose","version":"0.0.7","description":"Pretrained hand detection model","main":"dist/index.js","jsnext:main":"dist/handpose.esm.js","module":"dist/handpose.esm.js","unpkg":"dist/handpose.min.js","jsdelivr":"dist/handpose.min.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/tensorflow/tfjs-models.git"},"peerDependencies":{"@tensorflow/tfjs-converter":"^3.0.0","@tensorflow/tfjs-core":"^3.0.0","@tensorflow/tfjs-backend-webgl":"^3.0.0"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@rollup/plugin-typescript":"^3.0.0","@tensorflow/tfjs-converter":"^3.0.0","@tensorflow/tfjs-core":"^3.0.0","@tensorflow/tfjs-backend-cpu":"^3.0.0","@tensorflow/tfjs-backend-webgl":"^3.0.0","@types/jasmine":"~2.8.8","babel-core":"~6.26.0","babel-plugin-transform-runtime":"~6.23.0","jasmine-core":"~3.5.0","rollup":"~2.3.2","rollup-plugin-terser":"~5.3.0","rollup-plugin-visualizer":"~3.3.2","ts-node":"~8.8.2","tslint":"~5.18.0","typescript":"~3.5.3","yalc":"~1.0.0-pre.21"},"scripts":{"bundle":"rollup -c","build":"rimraf dist && tsc && yarn bundle","publish-local":"yarn build && rollup -c && yalc publish","test":"ts-node --skip-ignore --project tsconfig.test.json run_tests.ts","build-npm":"yarn build && yarn bundle","lint":"tslint -p . -t verbose","publish-demo":"./scripts/publish-demo.sh"},"license":"Apache-2.0","dependencies":{"rimraf":"^3.0.2"},"bugs":{"url":"https://github.com/tensorflow/tfjs-models/issues"},"homepage":"https://github.com/tensorflow/tfjs-models#readme","_id":"@tensorflow-models/handpose@0.0.7","_nodeVersion":"12.18.1","_npmVersion":"6.14.5","dist":{"shasum":"553d1bdc05dd437f6f24ea94373ec03267cb6e21","size":35545,"noattachment":false,"key":"/@tensorflow-models/handpose/-/@tensorflow-models/handpose-0.0.7.tgz","tarball":"http://registry.cnpm.dingdandao.com/@tensorflow-models/handpose/download/@tensorflow-models/handpose-0.0.7.tgz"},"_npmUser":{"name":"pyu10055","email":"ping.yu.11@gmail.com"},"directories":{},"maintainers":[{"name":"annxingyuan","email":""},{"name":"caisq","email":""},{"name":"dedongala","email":""},{"name":"fengwuyao","email":""},{"name":"jinjingforever","email":""},{"name":"linazhao128","email":""},{"name":"linchan","email":""},{"name":"mattsoulanille","email":""},{"name":"pyu10055","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/handpose_0.0.7_1612921422769_0.7152446717421386"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-25T16:01:17.452Z","publish_time":1612921422951,"_cnpm_publish_time":1612921422951},"0.0.6":{"name":"@tensorflow-models/handpose","version":"0.0.6","description":"Pretrained hand detection model","main":"dist/index.js","jsnext:main":"dist/handpose.esm.js","module":"dist/handpose.esm.js","unpkg":"dist/handpose.min.js","jsdelivr":"dist/handpose.min.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/tensorflow/tfjs-models.git"},"peerDependencies":{"@tensorflow/tfjs-converter":"^2.1.0","@tensorflow/tfjs-core":"^2.1.0"},"devDependencies":{"@rollup/plugin-commonjs":"^11.0.2","@rollup/plugin-node-resolve":"^7.1.1","@rollup/plugin-typescript":"^3.0.0","@tensorflow/tfjs-converter":"^2.1.0","@tensorflow/tfjs-core":"^2.1.0","@tensorflow/tfjs-backend-cpu":"^2.1.0","@types/jasmine":"~2.8.8","babel-core":"~6.26.0","babel-plugin-transform-runtime":"~6.23.0","jasmine-core":"~3.5.0","rollup":"~2.3.2","rollup-plugin-terser":"~5.3.0","rollup-plugin-visualizer":"~3.3.2","ts-node":"~8.8.2","tslint":"~5.18.0","typescript":"~3.5.3","yalc":"~1.0.0-pre.21"},"scripts":{"build":"rimraf dist && tsc","publish-local":"yarn build && rollup -c && yalc publish","test":"yarn build && ts-node --skip-ignore run_tests.ts","build-npm":"yarn build && rollup -c --npm","lint":"tslint -p . -t verbose","publish-demo":"./scripts/publish-demo.sh"},"license":"Apache-2.0","dependencies":{"rimraf":"^3.0.2"},"bugs":{"url":"https://github.com/tensorflow/tfjs-models/issues"},"homepage":"https://github.com/tensorflow/tfjs-models#readme","_id":"@tensorflow-models/handpose@0.0.6","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"shasum":"9cb383ce2a723501a83d001284145d9a30703f77","size":33588,"noattachment":false,"key":"/@tensorflow-models/handpose/-/@tensorflow-models/handpose-0.0.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/@tensorflow-models/handpose/download/@tensorflow-models/handpose-0.0.6.tgz"},"maintainers":[{"name":"annxingyuan","email":""},{"name":"caisq","email":""},{"name":"dedongala","email":""},{"name":"fengwuyao","email":""},{"name":"jinjingforever","email":""},{"name":"linazhao128","email":""},{"name":"linchan","email":""},{"name":"mattsoulanille","email":""},{"name":"pyu10055","email":""}],"_npmUser":{"name":"annxingyuan","email":"annyuan@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/handpose_0.0.6_1597067177863_0.12891808647815295"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-25T16:01:14.698Z","publish_time":1597067177995,"_cnpm_publish_time":1597067177995},"0.0.5":{"name":"@tensorflow-models/handpose","version":"0.0.5","description":"Pretrained hand detection model","main":"dist/index.js","jsnext:main":"dist/handpose.esm.js","module":"dist/handpose.esm.js","unpkg":"dist/handpose.min.js","jsdelivr":"dist/handpose.min.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/tensorflow/tfjs-models.git"},"peerDependencies":{"@tensorflow/tfjs-converter":"^1.7.0","@tensorflow/tfjs-core":"^1.7.0"},"devDependencies":{"@tensorflow/tfjs-converter":"^1.7.0","@tensorflow/tfjs-core":"^1.7.0","@types/jasmine":"~2.5.53","jasmine":"~3.2.0","jasmine-core":"~3.1.0","rimraf":"~2.6.2","rollup":"~0.58.2","rollup-plugin-node-resolve":"~3.3.0","rollup-plugin-typescript2":"~0.13.0","rollup-plugin-uglify":"~3.0.0","ts-node":"~5.0.0","tslint":"~5.8.0","typescript":"3.3.3333","yalc":"^1.0.0-pre.27"},"scripts":{"build":"rimraf dist && tsc","publish-local":"yarn build && rollup -c && yalc publish","test":"ts-node run_tests.ts","build-npm":"yarn build && rollup -c","lint":"tslint -p . -t verbose","publish-demo":"./scripts/publish-demo.sh"},"license":"Apache-2.0","bugs":{"url":"https://github.com/tensorflow/tfjs-models/issues"},"homepage":"https://github.com/tensorflow/tfjs-models#readme","_id":"@tensorflow-models/handpose@0.0.5","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"shasum":"0385ba82a7d81d4ac38cf4fd37be5a014dea2d42","size":28080,"noattachment":false,"key":"/@tensorflow-models/handpose/-/@tensorflow-models/handpose-0.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/@tensorflow-models/handpose/download/@tensorflow-models/handpose-0.0.5.tgz"},"maintainers":[{"name":"annxingyuan","email":""},{"name":"caisq","email":""},{"name":"dedongala","email":""},{"name":"fengwuyao","email":""},{"name":"jinjingforever","email":""},{"name":"linazhao128","email":""},{"name":"linchan","email":""},{"name":"mattsoulanille","email":""},{"name":"pyu10055","email":""}],"_npmUser":{"name":"annxingyuan","email":"annyuan@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/handpose_0.0.5_1592506394856_0.9152343076343004"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-25T16:01:13.558Z","publish_time":1592506395429,"_cnpm_publish_time":1592506395429},"0.0.4":{"name":"@tensorflow-models/handpose","version":"0.0.4","description":"Pretrained hand detection model","main":"dist/index.js","jsnext:main":"dist/handpose.esm.js","module":"dist/handpose.esm.js","unpkg":"dist/handpose.min.js","jsdelivr":"dist/handpose.min.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/tensorflow/tfjs-models.git"},"peerDependencies":{"@tensorflow/tfjs-converter":"^1.7.0","@tensorflow/tfjs-core":"^1.7.0"},"devDependencies":{"@tensorflow/tfjs-converter":"^1.7.0","@tensorflow/tfjs-core":"^1.7.0","@types/jasmine":"~2.5.53","jasmine":"~3.2.0","jasmine-core":"~3.1.0","rimraf":"~2.6.2","rollup":"~0.58.2","rollup-plugin-node-resolve":"~3.3.0","rollup-plugin-typescript2":"~0.13.0","rollup-plugin-uglify":"~3.0.0","ts-node":"~5.0.0","tslint":"~5.8.0","typescript":"3.3.3333","yalc":"^1.0.0-pre.27"},"scripts":{"build":"rimraf dist && tsc","publish-local":"yarn build && rollup -c && yalc publish","test":"ts-node run_tests.ts","build-npm":"yarn build && rollup -c","lint":"tslint -p . -t verbose","publish-demo":"./scripts/publish-demo.sh"},"license":"Apache-2.0","bugs":{"url":"https://github.com/tensorflow/tfjs-models/issues"},"homepage":"https://github.com/tensorflow/tfjs-models#readme","_id":"@tensorflow-models/handpose@0.0.4","_nodeVersion":"12.10.0","_npmVersion":"6.11.3","dist":{"shasum":"3740629a1b48b72398c173553e5976f2630bb5d7","size":43415,"noattachment":false,"key":"/@tensorflow-models/handpose/-/@tensorflow-models/handpose-0.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/@tensorflow-models/handpose/download/@tensorflow-models/handpose-0.0.4.tgz"},"maintainers":[{"name":"annxingyuan","email":""},{"name":"caisq","email":""},{"name":"dedongala","email":""},{"name":"fengwuyao","email":""},{"name":"jinjingforever","email":""},{"name":"linazhao128","email":""},{"name":"linchan","email":""},{"name":"mattsoulanille","email":""},{"name":"pyu10055","email":""}],"_npmUser":{"name":"tafsiri","email":"yassogba@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/handpose_0.0.4_1589910702730_0.09335129187060853"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-25T16:01:11.599Z","publish_time":1589910702928,"_cnpm_publish_time":1589910702928},"0.0.3":{"name":"@tensorflow-models/handpose","version":"0.0.3","description":"Pretrained hand detection model","main":"dist/index.js","jsnext:main":"dist/handpose.esm.js","module":"dist/handpose.esm.js","unpkg":"dist/handpose.min.js","jsdelivr":"dist/handpose.min.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/tensorflow/tfjs-models.git"},"peerDependencies":{"@tensorflow/tfjs-core":"^1.6.1","@tensorflow/tfjs-converter":"^1.6.1"},"devDependencies":{"@tensorflow/tfjs-core":"^1.6.1","@tensorflow/tfjs-converter":"^1.6.1","@types/jasmine":"~2.5.53","jasmine":"~3.2.0","jasmine-core":"~3.1.0","rimraf":"~2.6.2","rollup":"~0.58.2","rollup-plugin-node-resolve":"~3.3.0","rollup-plugin-typescript2":"~0.13.0","rollup-plugin-uglify":"~3.0.0","ts-node":"~5.0.0","tslint":"~5.8.0","typescript":"3.3.3333","yalc":"^1.0.0-pre.27"},"scripts":{"build":"rimraf dist && tsc","publish-local":"yarn build && rollup -c && yalc publish","test":"ts-node run_tests.ts","build-npm":"yarn build && rollup -c","lint":"tslint -p . -t verbose","publish-demo":"./scripts/publish-demo.sh"},"license":"Apache-2.0","bugs":{"url":"https://github.com/tensorflow/tfjs-models/issues"},"homepage":"https://github.com/tensorflow/tfjs-models#readme","_id":"@tensorflow-models/handpose@0.0.3","_nodeVersion":"12.7.0","_npmVersion":"6.11.3","dist":{"shasum":"e7e7a355dab69341f9fdbefe0bd2a3091944a9bf","size":27575,"noattachment":false,"key":"/@tensorflow-models/handpose/-/@tensorflow-models/handpose-0.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/@tensorflow-models/handpose/download/@tensorflow-models/handpose-0.0.3.tgz"},"maintainers":[{"name":"annxingyuan","email":""},{"name":"caisq","email":""},{"name":"dedongala","email":""},{"name":"fengwuyao","email":""},{"name":"jinjingforever","email":""},{"name":"linazhao128","email":""},{"name":"linchan","email":""},{"name":"mattsoulanille","email":""},{"name":"pyu10055","email":""}],"_npmUser":{"name":"annxingyuan","email":"annyuan@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/handpose_0.0.3_1583933848202_0.03412122684499996"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-25T16:01:10.673Z","publish_time":1583933848603,"_cnpm_publish_time":1583933848603},"0.0.2":{"name":"@tensorflow-models/handpose","version":"0.0.2","description":"Pretrained hand detection model","main":"dist/index.js","jsnext:main":"dist/handpose.esm.js","module":"dist/handpose.esm.js","unpkg":"dist/handpose.min.js","jsdelivr":"dist/handpose.min.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/tensorflow/tfjs-models.git"},"peerDependencies":{"@tensorflow/tfjs-core":"^1.6.1","@tensorflow/tfjs-converter":"^1.6.1"},"devDependencies":{"@tensorflow/tfjs-core":"^1.6.1","@tensorflow/tfjs-converter":"^1.6.1","@types/jasmine":"~2.5.53","jasmine":"~3.2.0","jasmine-core":"~3.1.0","rimraf":"~2.6.2","rollup":"~0.58.2","rollup-plugin-node-resolve":"~3.3.0","rollup-plugin-typescript2":"~0.13.0","rollup-plugin-uglify":"~3.0.0","ts-node":"~5.0.0","tslint":"~5.8.0","typescript":"3.3.3333","yalc":"^1.0.0-pre.27"},"scripts":{"build":"rimraf dist && tsc","publish-local":"yarn build && rollup -c && yalc publish","test":"ts-node run_tests.ts","build-npm":"yarn build && rollup -c","lint":"tslint -p . -t verbose","publish-demo":"./scripts/publish-demo.sh"},"license":"Apache-2.0","bugs":{"url":"https://github.com/tensorflow/tfjs-models/issues"},"homepage":"https://github.com/tensorflow/tfjs-models#readme","_id":"@tensorflow-models/handpose@0.0.2","_nodeVersion":"12.7.0","_npmVersion":"6.11.3","dist":{"shasum":"d5ce96f42a418bd9278e48f5ce5762933dba4242","size":27575,"noattachment":false,"key":"/@tensorflow-models/handpose/-/@tensorflow-models/handpose-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/@tensorflow-models/handpose/download/@tensorflow-models/handpose-0.0.2.tgz"},"maintainers":[{"name":"annxingyuan","email":""},{"name":"caisq","email":""},{"name":"dedongala","email":""},{"name":"fengwuyao","email":""},{"name":"jinjingforever","email":""},{"name":"linazhao128","email":""},{"name":"linchan","email":""},{"name":"mattsoulanille","email":""},{"name":"pyu10055","email":""}],"_npmUser":{"name":"annxingyuan","email":"annyuan@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/handpose_0.0.2_1583603765273_0.6235097102222005"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-25T16:01:09.745Z","publish_time":1583603765454,"_cnpm_publish_time":1583603765454}},"readme":"# MediaPipe Handpose\nNote: this model can only detect a maximum of one hand in the input - multi-hand detection is coming in a future release.\n\nMediaPipe Handpose is a lightweight ML pipeline consisting of two models: A palm detector and a hand-skeleton finger tracking model. It predicts 21 3D hand keypoints per detected hand. For more details, please read our Google AI [blogpost](https://ai.googleblog.com/2019/08/on-device-real-time-hand-tracking-with.html).\n\n<img src=\"demo/demo.gif\" alt=\"demo\" style=\"width:640px\" />\n\nGiven an input, the model predicts whether it contains a hand. If so, the model returns coordinates for the bounding box around the hand, as well as 21 keypoints within the hand, outlining the location of each finger joint and the palm.\n\nMore background information about the model, as well as its performance characteristics on different datasets, can be found here: [https://drive.google.com/file/d/1sv4sSb9BSNVZhLzxXJ0jBv9DqD-4jnAz/view](https://drive.google.com/file/d/1sv4sSb9BSNVZhLzxXJ0jBv9DqD-4jnAz/view)\n\nCheck out our [demo](https://storage.googleapis.com/tfjs-models/demos/handtrack/index.html), which uses the model to detect hand landmarks in a live video stream.\n\nThis model is also available as part of [MediaPipe](https://hand.mediapipe.dev/), a framework for building multimodal applied ML pipelines.\n\n# Performance\n\nMediaPipe Handpose consists of ~12MB of weights, and is well-suited for real time inference across a variety of devices (40 FPS on a 2018 MacBook Pro, 35 FPS on an iPhone11, 6 FPS on a Pixel3).\n\n## Installation\n\nVia script tags:\n\n```html\n<!-- Require the peer dependencies of handpose. -->\n<script src=\"https://unpkg.com/@tensorflow/tfjs-core@2.1.0/dist/tf-core.js\"></script>\n<script src=\"https://unpkg.com/@tensorflow/tfjs-converter@2.1.0/dist/tf-converter.js\"></script>\n\n<!-- You must explicitly require a TF.js backend if you're not using the tfs union bundle. -->\n<script src=\"https://unpkg.com/@tensorflow/tfjs-backend-webgl@2.1.0/dist/tf-backend-webgl.js\"></script>\n<!-- Alternatively you can use the WASM backend: <script src=\"https://unpkg.com/@tensorflow/tfjs-backend-wasm@2.1.0/dist/tf-backend-wasm.js\"></script> -->\n\n<script src=\"https://unpkg.com/@tensorflow-models/handpose@0.0.6/dist/handpose.js\"></script>\n```\n\nVia npm:\n\nUsing `yarn`:\n\n    $ yarn add @tensorflow-models/handpose\n    $ yarn add @tensorflow/tfjs-core, @tensorflow/tfjs-converter\n    $ yarn add @tensorflow/tfjs-backend-webgl # or @tensorflow/tfjs-backend-wasm\n\n## Usage\n\nIf you are using npm, first add:\n\n```js\nconst handpose = require('@tensorflow-models/handpose');\n\nrequire('@tensorflow/tfjs-backend-webgl'); // handpose does not itself require a backend, so you must explicitly install one.\n\n// If you are using the WASM backend:\n// require('@tensorflow/tfjs-backend-wasm');\n```\n\nThen:\n\n```js\nasync function main() {\n  // Load the MediaPipe handpose model.\n  const model = await handpose.load();\n  // Pass in a video stream (or an image, canvas, or 3D tensor) to obtain a\n  // hand prediction from the MediaPipe graph.\n  const predictions = await model.estimateHands(document.querySelector(\"video\"));\n  if (predictions.length > 0) {\n    /*\n    `predictions` is an array of objects describing each detected hand, for example:\n    [\n      {\n        handInViewConfidence: 1, // The probability of a hand being present.\n        boundingBox: { // The bounding box surrounding the hand.\n          topLeft: [162.91, -17.42],\n          bottomRight: [548.56, 368.23],\n        },\n        landmarks: [ // The 3D coordinates of each hand landmark.\n          [472.52, 298.59, 0.00],\n          [412.80, 315.64, -6.18],\n          ...\n        ],\n        annotations: { // Semantic groupings of the `landmarks` coordinates.\n          thumb: [\n            [412.80, 315.64, -6.18]\n            [350.02, 298.38, -7.14],\n            ...\n          ],\n          ...\n        }\n      }\n    ]\n    */\n\n    for (let i = 0; i < predictions.length; i++) {\n      const keypoints = predictions[i].landmarks;\n\n      // Log hand keypoints.\n      for (let i = 0; i < keypoints.length; i++) {\n        const [x, y, z] = keypoints[i];\n        console.log(`Keypoint ${i}: [${x}, ${y}, ${z}]`);\n      }\n    }\n  }\n}\nmain();\n```\n\n#### Parameters for handpose.load()\n\n`handpose.load()` takes a configuration object with the following properties:\n\n* **maxContinuousChecks** - How many frames to go without running the bounding box detector. Defaults to infinity. Set to a lower value if you want a safety net in case the mesh detector produces consistently flawed predictions.\n\n* **detectionConfidence** - Threshold for discarding a prediction. Defaults to 0.8.\n\n* **iouThreshold** - A float representing the threshold for deciding whether boxes overlap too much in non-maximum suppression. Must be between [0, 1]. Defaults to 0.3.\n\n* **scoreThreshold** - A threshold for deciding when to remove boxes based on score in non-maximum suppression. Defaults to 0.75.\n\n#### Parameters for handpose.estimateHands()\n\n* **input** - The image to classify. Can be a tensor, DOM element image, video, or canvas.\n\n* **flipHorizontal** - Whether to flip/mirror the hand keypoints horizontally. Should be true for videos that are flipped by default (e.g. webcams).\n","_attachments":{},"homepage":"https://github.com/tensorflow/tfjs-models#readme","bugs":{"url":"https://github.com/tensorflow/tfjs-models/issues"},"license":"Apache-2.0"}