{"_id":"@microsoft/customvision-tfjs-node","_rev":"97-f629c51bc26accad45386ca68c8234bf","name":"@microsoft/customvision-tfjs-node","dist-tags":{"latest":"1.2.0"},"versions":{"1.0.0":{"name":"@microsoft/customvision-tfjs-node","version":"1.0.0","author":"","license":"MIT","_id":"@microsoft/customvision-tfjs-node@1.0.0","maintainers":[{"name":"microsoft","email":"npmjs@microsoft.com"}],"homepage":"https://github.com/microsoft/customvision-tfjs-node#readme","bugs":{"url":"https://github.com/microsoft/customvision-tfjs-node/issues"},"dist":{"shasum":"247f81c184541dd6f6e8b6119baf1be63293baa3","tarball":"https://registry.npmjs.org/@microsoft/customvision-tfjs-node/-/customvision-tfjs-node-1.0.0.tgz","fileCount":4,"integrity":"sha512-VGNhoXsYsGKfDouCQnBs8G61eqnU/iG4lMmcg4tPRgiIK70lKCeqxkNiUeLS5qqYO3uCJriRkvj1SeILarDVtg==","signatures":[{"sig":"MEUCICIbirIBeSI/+/NQgb5xRTP0IFUcq0uiNu+xYeaA8/3XAiEAu9tKyrwXusfGMYocavvGHE3gRwVCQgz2OIIqYhmGfHU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16611,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNwMbCRA9TVsSAnZWagAAoHgP/igLs7qh1m+vzkBn3Rs2\nxu03/eNZdqVKUSxhN+gR1WblD5qshtU2tJkjSj94pmwlvuDCo+SG8TZHQJFV\n6BvTbWu0sVdrLf2h5Uam+SPtjHhWB6nWi7ISkgB2fINOsxB2M3lLchenzgLj\nYwBp9h7L7Hfr5RVofrBUHU1DoqGSiHRzes2u0ff8sLKtLF0XKINGel2Nw9VW\n1EfVDuLvqgt6QUqfwZW0wNaiWy6sMNeL+nzydpX8lQf0TyoiUw9TXoOggles\nUiH8MKFTbdpCIwLKDKDAur7VsdgIiCBNC5wyBvEHQYFwg1UoM81tAMBuonhB\nZtZFPoMSksDjxPHjnV7NRbr/qxYlayENMVzl5rhQ7pEcWabXJqmKqR4wBUYH\n8xuL/YGCsAp+Wn3/r9l3zRCR7123lPoO63saXotQE3oD09b5EhDbf4gQ9jB+\nr0AK2D89mbF0jXNEeJHYL54OJOnE3Wg2eFZCXZWGAqWEhQ+Vcy8a0kXouqqW\nHc/n371gJZZCBqx4TvcqWQA/DRfkqRD8Lgm5dSufMqfR6huJm/AuyEBCB3Ku\ncXkXXclgMiCcGwZJAf1SLsfo2P1RxzTFbQSGo/70GIqquHZMfhf+W4K0uNwf\nryTt+4q33h69tQQbdicHCy8hRirFGDy+LWlFxk/O4D4NpGiGOsPAJOLbOI08\n9WrG\r\n=gdU6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","babel":{"plugins":["@babel/plugin-transform-runtime"],"presets":[["@babel/preset-env",{"targets":[">0.1%"]}]]},"gitHead":"01f982c91314fc54c3d4c6d27d05e4fa57ca3117","scripts":{"build":"babel src --out-dir lib"},"_npmUser":{"name":"microsoft","email":"npmjs@microsoft.com"},"repository":{"url":"git+https://github.com/microsoft/customvision-tfjs-node.git","type":"git"},"_npmVersion":"6.14.7","description":"Node.js library for Tensorflow.js models exported from customvision.ai","directories":{},"_nodeVersion":"12.16.1","dependencies":{"@babel/runtime":"^7.6.3","@tensorflow/tfjs-node":"^2.1.0"},"_hasShrinkwrap":false,"devDependencies":{"@babel/cli":"^7.6.4","@babel/core":"^7.6.4","@babel/preset-env":"^7.6.3","@babel/plugin-transform-runtime":"^7.6.2"},"_npmOperationalInternal":{"tmp":"tmp/customvision-tfjs-node_1.0.0_1597440794863_0.12794081878482522","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@microsoft/customvision-tfjs-node","version":"1.1.0","author":"","license":"MIT","_id":"@microsoft/customvision-tfjs-node@1.1.0","maintainers":[{"name":"microsoft","email":"npmjs@microsoft.com"},{"name":"shono","email":"shonohs@outlook.com"}],"homepage":"https://github.com/microsoft/customvision-tfjs-node#readme","bugs":{"url":"https://github.com/microsoft/customvision-tfjs-node/issues"},"dist":{"shasum":"2a870a3252635d05b7a221c8fd5f3bc48f24768d","tarball":"https://registry.npmjs.org/@microsoft/customvision-tfjs-node/-/customvision-tfjs-node-1.1.0.tgz","fileCount":4,"integrity":"sha512-tDijDDAGxNwKmBDw5Odtc5RQ1jx27SZjpfoTtFZ8WPCUW6rg6MjtL0cClAihgMazEP5/bxtJH27CqeBAkyk1YQ==","signatures":[{"sig":"MEUCIArpuzhs6lxkCwgEy/mUorFrGZ/Hr50a8QxAc0X7ULfkAiEA2i9zzuWdliWqfDwf4e52LLsvD0Cr1dODC1VeJMyB120=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16764,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgANfdCRA9TVsSAnZWagAAXWEQAKLw4e2DSlvYu6Li2YOg\nH1Ee/fYPIHuRbKMlBl8clYYdlkAefS0UjoWuOxICbANPNEIDlbDB4rMPJFIo\ny4gPrk3p6lieQFPV+P2mgp8KKpnytDOd078BkSAFRQ4B6OwEl0jf8Eqcg0mV\n1KS0awnnwbn5CgzxLkVBEnHdGPPLMGovzXqPGtNws/miZJgJqqnbkLPaUHGu\n3WenZ0oWZglxI2paGlwJjkbI1CzF88jsp1g5lOJPqO0oAngRtIYwYnTv/E88\n9ijjjo8YNKbuwoaVxFJFOTUxp/9Bbz2qil+XAnuxsLIC9o35ohFJdF9P+sYr\ncTn+yxCEabF/20g2SyV4Uc1FFbv+dgD/QF8kvRBAwN6ihjWsMz8NoQP6uW63\n9YGBh9INZKVufQDC274SLhRGip/RN/ccPvbacU1rVx+6BQeLHIsmbFOBw8ii\nIkN9/JYV5Jk4cMjGHBL/F8QaqlhReJTc3ux8FdgFXFgQ+urDj1KCsWOuZk8d\nvuZr4iA7D8DtRegwMd4pdY/3jgJD96lZ9bdrax7NRfJ8K+WNMCzUY1dByfR0\nRQQgbBr4fV7UPybCixdm2XaWyZIVzdez5IPsgpgMLgQGDwbvP69amL4k7Bb1\nUVRUUA4vTp3L75vjMex9atTMDI+QcR2gQRQxaup86mo2a1yigbjlsKvQkfxU\nUlVg\r\n=8XCJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","babel":{"plugins":["@babel/plugin-transform-runtime"],"presets":[["@babel/preset-env",{"targets":[">0.1%"]}]]},"gitHead":"faa53de92c8ecb4df7b7b76835fcfae736015781","scripts":{"build":"babel src --out-dir lib"},"_npmUser":{"name":"shono","email":"shonohs@outlook.com"},"repository":{"url":"git+https://github.com/microsoft/customvision-tfjs-node.git","type":"git"},"_npmVersion":"6.14.4","description":"Node.js library for Tensorflow.js models exported from customvision.ai","directories":{},"_nodeVersion":"10.19.0","dependencies":{"@babel/runtime":"^7.12.5","@tensorflow/tfjs-node":"^2.8.3"},"_hasShrinkwrap":false,"devDependencies":{"@babel/cli":"^7.12.10","@babel/core":"^7.12.10","@babel/preset-env":"^7.12.11","@babel/plugin-transform-runtime":"^7.12.10"},"_npmOperationalInternal":{"tmp":"tmp/customvision-tfjs-node_1.1.0_1610667996899_0.40600904278609473","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"@microsoft/customvision-tfjs-node","version":"1.2.0","author":"","license":"MIT","_id":"@microsoft/customvision-tfjs-node@1.2.0","maintainers":[{"name":"shono","email":"shonohs@outlook.com"}],"homepage":"https://github.com/microsoft/customvision-tfjs-node#readme","bugs":{"url":"https://github.com/microsoft/customvision-tfjs-node/issues"},"dist":{"shasum":"3d65e24b226fb88c824126045893525f1b83bc2d","tarball":"https://registry.npmjs.org/@microsoft/customvision-tfjs-node/-/customvision-tfjs-node-1.2.0.tgz","fileCount":4,"integrity":"sha512-EqrzWGrHFYldD9hdgW6CqCNpASQiQbyBXiRffSq3XT/ZNjbrWNfNpM8ctr6kPHX/En1FGR84JYMrQc2O5nQsvw==","signatures":[{"sig":"MEQCIBz2lhBK4jxUyIeTirSfHNbSmWtBq4hCWQixnbpzBAXzAiAmwUJ7eiuRDVvd79ZAvIiMzRWjcQHKO1IDOBQK/ysQPA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17883,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhuv5eCRA9TVsSAnZWagAAsP0QAIX0LNhAnck03QzJK/4r\nlYq9sxkiSkFY0575a1DO0143Aca+m1hFILobwwJ9Wn6D4F/xWhzWumaw3xxm\nhBAo9IlgYPNcV3ECmoII9WoLDGpoGqZ6Q7G6zXVBPewpFnrzwv/4DOdknEys\nvu20klt9Ia4yvmT8GvMO0LriSBymTHswvBUvr4iDUdZpEQ/qgvrwV5yTXbhs\ncOrGzmrEINhRiCpYELFeDQ1KACuXyEAWVpgewzE422cWm4SIEgPJgsrT0UOH\njfdSr5CHS/M8cjp6H+x0cXjyOxyth8fIRzals4stjnAAo/GFaH13uMI17T2h\nF8zlS5SrYsgEtGJKVM+zxDZVAOjoy5G3+tvv/YJrhD0084+xRN/17hh9EfAb\nKgFFwNTdXuxizbGw6fKBiDH0yl/9UWsXFsMniEo66lLDvi2TcYnTscgvSzJL\nqICAP9fwUhWeJIdHQFJkQ42189OgInvfAoLCc7HzHC6GhYSqjs2fItrut9Lt\nLfZwCrQ3pRQ+E+/2eDRRQ8rYeFs0bxtBe9Z+nFuZX88zWqySmhg4ajXyp98l\nLRqEPLcLep9pW965aCMjsNs95BgY3DEyfuAtAEENgannQ85KSiWzdPL2sAlb\nECcUrby6bZCSaY1GEKjZuShbaNDsHIqOgAh++VS4ycfUIzQ3XU4aGr+IaX9l\nycRm\r\n=Iy8N\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","babel":{"plugins":["@babel/plugin-transform-runtime"],"presets":[["@babel/preset-env",{"targets":[">0.1%"]}]]},"gitHead":"ee4d8088fc9c5d9e7e9f0103eea786de061327bd","scripts":{"build":"babel src --out-dir lib"},"_npmUser":{"name":"shono","email":"shonohs@outlook.com"},"repository":{"url":"git+https://github.com/microsoft/customvision-tfjs-node.git","type":"git"},"_npmVersion":"6.14.4","description":"Node.js library for Tensorflow.js models exported from customvision.ai","directories":{},"_nodeVersion":"10.19.0","dependencies":{"@babel/runtime":"^7.12.5","@tensorflow/tfjs-node":"^3.12.0"},"_hasShrinkwrap":false,"devDependencies":{"@babel/cli":"^7.12.10","@babel/core":"^7.12.10","@babel/preset-env":"^7.12.11","@babel/plugin-transform-runtime":"^7.12.10"},"_npmOperationalInternal":{"tmp":"tmp/customvision-tfjs-node_1.2.0_1639644766694_0.0033799357234278737","host":"s3://npm-registry-packages"}}},"time":{"created":"2020-08-14T21:33:14.820Z","modified":"2026-07-16T15:43:54.076Z","1.0.0":"2020-08-14T21:33:14.977Z","1.1.0":"2021-01-14T23:46:37.068Z","1.2.0":"2021-12-16T08:52:46.813Z"},"bugs":{"url":"https://github.com/microsoft/customvision-tfjs-node/issues"},"license":"MIT","homepage":"https://github.com/microsoft/customvision-tfjs-node#readme","repository":{"url":"git+https://github.com/microsoft/customvision-tfjs-node.git","type":"git"},"description":"Node.js library for Tensorflow.js models exported from customvision.ai","maintainers":[{"email":"npmjs@microsoft.com","name":"microsoft1es"},{"email":"microsoft-oss-publishing@microsoft.com","name":"microsoft-oss-releases"},{"email":"shonohs@outlook.com","name":"shono"}],"readme":"# customvision-tfjs-node\nNode.js package for TensorFlow.js models exported from Custom Vision Service\n\nIf you are looking for a library to use on the browser, please try [customvision-tfjs](https://github.com/microsoft/customvision-tfjs).\n\n## Install\n```sh\nnpm install @microsoft/customvision-tfjs-node\n```\n\n## Usage\n\n### Classification\n```js\nconst cvstfjs = require('@microsoft/customvision-tfjs-node');\n\nasync function executeAsync(image_filepath) {\n  const model = new cvstfjs.ClassificationModel();\n  await model.loadModelAsync('file://model.json');\n  fs.readFile(image_filepath, function (err, data) {\n    if (err) {\n      throw err;\n    }\n\n    const result = await model.executeAsync(data);\n    console.log(result);\n  })\n}\n```\n\nThe result is a 1D-array of probabilities.\n\n### Object Detection\n```js\nconst cvstfjs = require('@microsoft/customvision-tfjs-node');\n\nasync function executeAsync(image_filepath) {\n  const model = new cvstfjs.ObjectDetectionModel();\n  await model.loadModelAsync('file://model.json');\n  fs.readFile(image_filepath, function (err, data) {\n    if (err) {\n      throw err;\n    }\n\n    const result = await model.executeAsync(data);\n    console.log(result);\n  })\n}\n```\n\nThe result has 3 arrays.\n```js\n\n[\n\t[[0.1, 0.3, 0.4, 0.3], [0.2, 0.4, 0.8, 0.9]], // bounding boxes (x1, y1, x2, y2)\n\t[0.2, 0.3], // probabilities\n\t[1, 4] // class ids\n]\n```\n\n# Contributing\n\nThis project welcomes contributions and suggestions.  Most contributions require you to agree to a\nContributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us\nthe rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.\n\nWhen you submit a pull request, a CLA bot will automatically determine whether you need to provide\na CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions\nprovided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or\ncontact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n","readmeFilename":"README.md"}