├── .gitignore ├── .nvmrc ├── LICENSE ├── README.md ├── index.js ├── package-lock.json └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | *.DS* 3 | .vscode -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | 10.2.1 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Teachable Machine Node 2 | 3 | ![teachable-machine-cover](https://media-blog.sashido.io/content/images/2020/09/teachable-machine-cover.png) 4 | 5 | # About 6 | 7 | **Teachable Machine Node** empowers you to load any image classification model trained with Google's Teachable Machine tool in a Node.Js project. 8 | 9 | [Teachable Machine](https://teachablemachine.withgoogle.com/) makes AI easy for everyone, by offering a fast and fun way to train a real TensorFlow.js Machine Learning Models without any coding required. You can train the computer to recognize images, sounds, & poses, using your camera or your own dataset. Check [The Awesome Teachable Machine List](https://github.com/SashiDo/awesome-teachable-machine) full of useful resources and amazing projects to gain some cool ideas. 10 | 11 | 12 | For now, Teachable Machine Node holds support only for image models, but we won't stop here. Check out the [Roadmap](#Roadmap) of what comes next! 13 | 14 | # Install 15 | 16 | - Install using npm 17 | 18 | ```sh 19 | npm install @sashido/teachablemachine-node 20 | ``` 21 | 22 | - Install using yarn 23 | 24 | ```sh 25 | yarn add @sashido/teachablemachine-node 26 | ``` 27 | 28 | 29 | # Usage 30 | 31 | ### Create you own Model with Teachable Machine 32 | 33 | 1. [Gathering samples](https://youtu.be/DFBbSTvtpy4) is the fundamental first step to your Teachable Machine Model. Use your camera to collect data or upload some preselected images. 34 | 35 | 2. [Train your Teachable Machine Image Model](https://teachablemachine.withgoogle.com/train?action=onboardOpen&id=CO67EQ0ZWgA). 36 | 37 | ![](https://media-blog.sashido.io/content/images/2020/09/tm_export_model.png) 38 | 39 | Check the `Advanced` option for further insights on the model performance and accuracy. Once certain it returns valid results, hit the Export option. 40 | 41 | 3. Make sure that you select Tensorflow.js format when exporting. That way your model will be uploaded (for free) and you will receive an access URL. 42 | 43 | ![ ](https://media-blog.sashido.io/content/images/2020/08/export_tendorflow.js.png) 44 | 45 | 4. Pass the URL to the teachablemachine-node to load the model. Next, let it have the image and call `classify` to get the predictions. You can pass the image URL or deliver it in base 64. It's up to your preference. 46 | 47 | ### Play around with our pre-trained 'Is It A Dog?' model. 48 | 49 | SashiDo's team is full of notorious animal lovers and no wonder the sample model was trained to recognize dog pics from other images. 😊 We've collected a dataset of more than 2000 images of dogs, cats, horses, other animals, people and everyday objects and uploaded them into two different classes with Teachable Machine. 50 | 51 | ![](https://media-blog.sashido.io/content/images/2020/09/example.gif) 52 | 53 | A big shoutout to [Unsplash.com](https://unsplash.com/) as a great platform for free photos. Check it out in case you're just starting and do not have raw data yet. 54 | 55 | You can load our **Is_It_A_Dog** model using this URL and following the example below: 56 | 57 | ``` 58 | https://teachablemachine.withgoogle.com/models/r6BBk-hiN/ 59 | ``` 60 | 61 | # Examples 62 | 63 | ### NodeJS 64 | 65 | Here's a quick example of how to load the model in your project. 66 | 67 | ```javascript 68 | const TeachableMachine = require("@sashido/teachablemachine-node"); 69 | 70 | const model = new TeachableMachine({ 71 | modelUrl: "https://teachablemachine.withgoogle.com/models/r6BBk-hiN/" 72 | }); 73 | 74 | model.classify({ 75 | imageUrl: "https://media-blog.sashido.io/content/images/2020/09/SashiDo_Dog.jpg", 76 | }).then((predictions) => { 77 | console.log("Predictions:", predictions); 78 | }).catch((e) => { 79 | console.log("ERROR", e); 80 | }); 81 | ``` 82 | 83 | ### ExpressJS 84 | 85 | And the alternative for all Express fans. 86 | 87 | ```javascript 88 | const express = require("express"); 89 | const TeachableMachine = require("@sashido/teachablemachine-node"); 90 | 91 | const model = new TeachableMachine({ 92 | modelUrl: "https://teachablemachine.withgoogle.com/models/r6BBk-hiN/" 93 | }); 94 | 95 | const app = express(); 96 | const port = 3000; 97 | 98 | app.get("/image/classify", async (req, res) => { 99 | const { url } = req.query; 100 | 101 | return model.classify({ 102 | imageUrl: url, 103 | }).then((predictions) => { 104 | console.log(predictions); 105 | return res.json(predictions); 106 | }).catch((e) => { 107 | console.error(e); 108 | res.status(500).send("Something went wrong!") 109 | }); 110 | }); 111 | 112 | app.listen(port, () => { 113 | console.log(`Example app listening at http://localhost:${port}`); 114 | }); 115 | ``` 116 | 117 | # Roadmap 118 | 119 | In the long run, we will add more options, so you can train and load all kinds of Teachable Machine Models. 120 | 121 | 1. Add support for Pose Models. 122 | 123 | 2. Add support for Audio Models. 124 | 125 | 3. Add support for Gifs. 126 | 127 | 4. Add support for Videos. 128 | 129 | We would love to have your opinion which's the one you would like to see supported first. Don't be shy and drop us a line at hello@sashido.io. 130 | 131 | # Contribute 132 | 133 | Contributors of any kind are welcome. Share your awesome improvements in a pull request and join our mission to make Machine Learning more affordable & accessible! 134 | 135 | # License 136 | 137 | Copyright © 2020, CloudStrap AD. See [LICENSE](https://github.com/SashiDo/teachablemachine-node/blob/master/LICENSE) for further details. 138 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | global.fetch = require("node-fetch"); 2 | 3 | const { Readable } = require('stream'); 4 | const tf = require('@tensorflow/tfjs'); 5 | const PImage = require('pureimage'); 6 | const isImageUrl = require('is-image-url'); 7 | const parseDataUrl = require('parse-data-url'); 8 | 9 | const wait = ms => new Promise(r => setTimeout(r, ms)); 10 | 11 | const retryOperation = (operation, delay, times) => new Promise((resolve, reject) => { 12 | return operation() 13 | .then(({ cb }) => { 14 | return resolve(cb()); 15 | }) 16 | .catch(({ message }) => { 17 | if (times - 1 > 0) { 18 | return wait(delay) 19 | .then(retryOperation.bind(null, operation, delay, times - 1)) 20 | .then(resolve) 21 | .catch(reject); 22 | } 23 | 24 | return reject(message); 25 | }); 26 | }); 27 | 28 | const bufferToStream = (binary) => { 29 | const readableInstanceStream = new Readable({ 30 | read() { 31 | this.push(binary); 32 | this.push(null); 33 | } 34 | }); 35 | 36 | return readableInstanceStream; 37 | } 38 | 39 | const predict = async (imgElement, model) => { 40 | const logits = tf.tidy(() => { 41 | // tf.browser.fromPixels() returns a Tensor from an image element. 42 | let img = tf.browser.fromPixels(imgElement).toFloat(); 43 | img = tf.image.resizeNearestNeighbor(img, [model.inputs[0].shape[1], model.inputs[0].shape[2]]); 44 | 45 | const offset = tf.scalar(127.5); 46 | // Normalize the image from [0, 255] to [-1, 1]. 47 | const normalized = img.sub(offset).div(offset); 48 | 49 | // Reshape to a single-element batch so we can pass it to predict. 50 | const batched = normalized.reshape([1, model.inputs[0].shape[1], model.inputs[0].shape[2], model.inputs[0].shape[3]]); 51 | 52 | return model.predict(batched); 53 | }); 54 | 55 | const predictions = await getTopKClasses(logits, model.classes); 56 | 57 | return predictions; 58 | } 59 | 60 | const getTopKClasses = async (logits, classes) => { 61 | const values = await logits.data(); 62 | const topK = Math.min(classes.length, values.length); 63 | 64 | const valuesAndIndices = []; 65 | for (let i = 0; i < values.length; i++) { 66 | valuesAndIndices.push({ value: values[i], index: i }); 67 | } 68 | 69 | valuesAndIndices.sort((a, b) => { 70 | return b.value - a.value; 71 | }); 72 | 73 | const topkValues = new Float32Array(topK); 74 | const topkIndices = new Int32Array(topK); 75 | for (let i = 0; i < topK; i++) { 76 | topkValues[i] = valuesAndIndices[i].value; 77 | topkIndices[i] = valuesAndIndices[i].index; 78 | } 79 | 80 | const topClassesAndProbs = []; 81 | for (let i = 0; i < topkIndices.length; i++) { 82 | topClassesAndProbs.push({ 83 | class: classes[topkIndices[i]], 84 | score: topkValues[i] 85 | }); 86 | } 87 | return topClassesAndProbs; 88 | } 89 | 90 | class SashiDoTeachableMachine { 91 | constructor(params) { 92 | this.loadModel(params); 93 | } 94 | 95 | async loadModel({ modelUrl }) { 96 | if (!modelUrl || modelUrl === "") { 97 | console.error("[@sashido/teachablemachine-node] -", "Missing model URL!"); 98 | this.error = "Missing model URL!"; 99 | return null; 100 | } 101 | 102 | try { 103 | const modelURL = `${modelUrl}model.json`; 104 | const response = await fetch(`${modelUrl}metadata.json`); 105 | const body = await response.text(); 106 | this.model = await tf.loadLayersModel(modelURL); 107 | this.model.classes = JSON.parse(body).labels; 108 | // console.log('@@@', this.model) 109 | 110 | } catch (e) { 111 | console.error("[@sashido/teachablemachine-node] -", e); 112 | } 113 | } 114 | 115 | async checkModel(cb) { 116 | const { model } = this; 117 | 118 | if (model) { 119 | return Promise.resolve({ cb }); 120 | } 121 | 122 | return Promise.reject({ message: "Loading model" }); 123 | } 124 | 125 | 126 | async classify(params) { 127 | const { imageUrl } = params; 128 | 129 | if ((!imageUrl.startsWith('data:image/')) && (!isImageUrl(imageUrl))) { 130 | return Promise.reject({ error: "Image URL is not valid!" }); 131 | } 132 | 133 | if (this.error) { 134 | return Promise.reject({ error: this.error }); 135 | } 136 | 137 | return retryOperation(() => this.checkModel(() => this.inference(params)), 1000, 20); // method, delay, retries 138 | } 139 | 140 | async inference({ imageUrl }) { 141 | try { 142 | let data; 143 | let buffer; 144 | let contentType; 145 | 146 | if (imageUrl.startsWith('data:image/')) { 147 | data = parseDataUrl(imageUrl); 148 | 149 | contentType = data.contentType; 150 | buffer = data.toBuffer(); 151 | } else { 152 | data = await fetch(imageUrl); 153 | 154 | contentType = data.headers.get("Content-Type"); 155 | buffer = await data.buffer(); 156 | } 157 | 158 | const stream = bufferToStream(buffer); 159 | let imageBitmap; 160 | 161 | if ((/png/).test(contentType)) { 162 | imageBitmap = await PImage.decodePNGFromStream(stream); 163 | } 164 | 165 | if ((/jpe?g/).test(contentType)) { 166 | imageBitmap = await PImage.decodeJPEGFromStream(stream); 167 | } 168 | 169 | const predictions = await predict(imageBitmap, this.model); 170 | return predictions; 171 | } catch (error) { 172 | return Promise.reject({ error }); 173 | } 174 | } 175 | } 176 | 177 | module.exports = SashiDoTeachableMachine; 178 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@sashido/teachablemachine-node", 3 | "version": "1.2.2", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "@tensorflow/tfjs": { 8 | "version": "2.4.0", 9 | "resolved": "https://registry.npmjs.org/@tensorflow/tfjs/-/tfjs-2.4.0.tgz", 10 | "integrity": "sha512-V1XLtUDyhs1yodu9LinakSeIdT7SfFLBbHqCFPKaIWo9d9u3ZGFP/owzsWBk7Wqoh74bpm+kCF0gDg93Qx6ssw==", 11 | "requires": { 12 | "@tensorflow/tfjs-backend-cpu": "2.4.0", 13 | "@tensorflow/tfjs-backend-webgl": "2.4.0", 14 | "@tensorflow/tfjs-converter": "2.4.0", 15 | "@tensorflow/tfjs-core": "2.4.0", 16 | "@tensorflow/tfjs-data": "2.4.0", 17 | "@tensorflow/tfjs-layers": "2.4.0", 18 | "argparse": "^1.0.10", 19 | "chalk": "^4.1.0", 20 | "core-js": "3", 21 | "regenerator-runtime": "^0.13.5" 22 | } 23 | }, 24 | "@tensorflow/tfjs-backend-cpu": { 25 | "version": "2.4.0", 26 | "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-cpu/-/tfjs-backend-cpu-2.4.0.tgz", 27 | "integrity": "sha512-obA7IOL2teqoVguQ8EKSrfOu7ypAWQdGiTx/QfSmyaqXc9Z3YSZ1Nx0W4yWeLMJkNsp/EjYvBDeuNRenaFg0Gg==", 28 | "requires": { 29 | "@types/seedrandom": "2.4.27", 30 | "seedrandom": "2.4.3" 31 | }, 32 | "dependencies": { 33 | "seedrandom": { 34 | "version": "2.4.3", 35 | "resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-2.4.3.tgz", 36 | "integrity": "sha1-JDhQTa0zkXMUv/GKxNeU8W1qrsw=" 37 | } 38 | } 39 | }, 40 | "@tensorflow/tfjs-backend-webgl": { 41 | "version": "2.4.0", 42 | "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-webgl/-/tfjs-backend-webgl-2.4.0.tgz", 43 | "integrity": "sha512-/wh2CmZ3G7XrzsYIg7C2/Wt/QxKpVOfm0yDI5eDrOBoaC+kUsD4avJTS64pCWOdAYSN3yHHJxWO7IySuRlw4+Q==", 44 | "requires": { 45 | "@tensorflow/tfjs-backend-cpu": "2.4.0", 46 | "@types/offscreencanvas": "~2019.3.0", 47 | "@types/seedrandom": "2.4.27", 48 | "@types/webgl-ext": "0.0.30", 49 | "@types/webgl2": "0.0.4", 50 | "seedrandom": "2.4.3" 51 | }, 52 | "dependencies": { 53 | "seedrandom": { 54 | "version": "2.4.3", 55 | "resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-2.4.3.tgz", 56 | "integrity": "sha1-JDhQTa0zkXMUv/GKxNeU8W1qrsw=" 57 | } 58 | } 59 | }, 60 | "@tensorflow/tfjs-converter": { 61 | "version": "2.4.0", 62 | "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-converter/-/tfjs-converter-2.4.0.tgz", 63 | "integrity": "sha512-H16ydhoN/Ah7jd1NO4VUs8UGYbVs77yzUrTIGzras1ios2vsBMwFDC7+boIEekF+O/BcOgu26LtiU8n5hB4lrw==" 64 | }, 65 | "@tensorflow/tfjs-core": { 66 | "version": "2.4.0", 67 | "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-core/-/tfjs-core-2.4.0.tgz", 68 | "integrity": "sha512-2SJ4PG56e1hixcwdT0oWcfaAe0tfJU+WAKHVeQP1xor4bzPDE8N7LCnRdYWTXbl5mNXRZ9h5qb+XtGEQrcUrJg==", 69 | "requires": { 70 | "@types/offscreencanvas": "~2019.3.0", 71 | "@types/seedrandom": "2.4.27", 72 | "@types/webgl-ext": "0.0.30", 73 | "@types/webgl2": "0.0.4", 74 | "node-fetch": "~2.1.2", 75 | "seedrandom": "2.4.3" 76 | }, 77 | "dependencies": { 78 | "node-fetch": { 79 | "version": "2.1.2", 80 | "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.1.2.tgz", 81 | "integrity": "sha1-q4hOjn5X44qUR1POxwb3iNF2i7U=" 82 | }, 83 | "seedrandom": { 84 | "version": "2.4.3", 85 | "resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-2.4.3.tgz", 86 | "integrity": "sha1-JDhQTa0zkXMUv/GKxNeU8W1qrsw=" 87 | } 88 | } 89 | }, 90 | "@tensorflow/tfjs-data": { 91 | "version": "2.4.0", 92 | "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-data/-/tfjs-data-2.4.0.tgz", 93 | "integrity": "sha512-Ok1OyO2xIXBQ+XaSNf7LBldl89jgrX31wzsKPeV2SzzgOhA4A1YlhqS9WmRCnCbllnbnSGLGW829KlLCNos0AQ==", 94 | "requires": { 95 | "@types/node-fetch": "^2.1.2", 96 | "node-fetch": "~2.1.2" 97 | }, 98 | "dependencies": { 99 | "node-fetch": { 100 | "version": "2.1.2", 101 | "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.1.2.tgz", 102 | "integrity": "sha1-q4hOjn5X44qUR1POxwb3iNF2i7U=" 103 | } 104 | } 105 | }, 106 | "@tensorflow/tfjs-layers": { 107 | "version": "2.4.0", 108 | "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-layers/-/tfjs-layers-2.4.0.tgz", 109 | "integrity": "sha512-+eBaClwS9MyCavFFW9x9DqiTAf2QoMWuCM3BtXkCNQxOG/bgb+9sfK63JvaUiHM/E/NgfzPyF95Pe4qkPCwBxg==" 110 | }, 111 | "@types/color-name": { 112 | "version": "1.1.1", 113 | "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", 114 | "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==" 115 | }, 116 | "@types/node": { 117 | "version": "14.11.2", 118 | "resolved": "https://registry.npmjs.org/@types/node/-/node-14.11.2.tgz", 119 | "integrity": "sha512-jiE3QIxJ8JLNcb1Ps6rDbysDhN4xa8DJJvuC9prr6w+1tIh+QAbYyNF3tyiZNLDBIuBCf4KEcV2UvQm/V60xfA==" 120 | }, 121 | "@types/node-fetch": { 122 | "version": "2.5.7", 123 | "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.7.tgz", 124 | "integrity": "sha512-o2WVNf5UhWRkxlf6eq+jMZDu7kjgpgJfl4xVNlvryc95O/6F2ld8ztKX+qu+Rjyet93WAWm5LjeX9H5FGkODvw==", 125 | "requires": { 126 | "@types/node": "*", 127 | "form-data": "^3.0.0" 128 | } 129 | }, 130 | "@types/offscreencanvas": { 131 | "version": "2019.3.0", 132 | "resolved": "https://registry.npmjs.org/@types/offscreencanvas/-/offscreencanvas-2019.3.0.tgz", 133 | "integrity": "sha512-esIJx9bQg+QYF0ra8GnvfianIY8qWB0GBx54PK5Eps6m+xTj86KLavHv6qDhzKcu5UUOgNfJ2pWaIIV7TRUd9Q==" 134 | }, 135 | "@types/seedrandom": { 136 | "version": "2.4.27", 137 | "resolved": "https://registry.npmjs.org/@types/seedrandom/-/seedrandom-2.4.27.tgz", 138 | "integrity": "sha1-nbVjk33YaRX2kJK8QyWdL0hXjkE=" 139 | }, 140 | "@types/webgl-ext": { 141 | "version": "0.0.30", 142 | "resolved": "https://registry.npmjs.org/@types/webgl-ext/-/webgl-ext-0.0.30.tgz", 143 | "integrity": "sha512-LKVgNmBxN0BbljJrVUwkxwRYqzsAEPcZOe6S2T6ZaBDIrFp0qu4FNlpc5sM1tGbXUYFgdVQIoeLk1Y1UoblyEg==" 144 | }, 145 | "@types/webgl2": { 146 | "version": "0.0.4", 147 | "resolved": "https://registry.npmjs.org/@types/webgl2/-/webgl2-0.0.4.tgz", 148 | "integrity": "sha512-PACt1xdErJbMUOUweSrbVM7gSIYm1vTncW2hF6Os/EeWi6TXYAYMPp+8v6rzHmypE5gHrxaxZNXgMkJVIdZpHw==" 149 | }, 150 | "ansi-styles": { 151 | "version": "4.2.1", 152 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", 153 | "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", 154 | "requires": { 155 | "@types/color-name": "^1.1.1", 156 | "color-convert": "^2.0.1" 157 | } 158 | }, 159 | "argparse": { 160 | "version": "1.0.10", 161 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", 162 | "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", 163 | "requires": { 164 | "sprintf-js": "~1.0.2" 165 | } 166 | }, 167 | "asap": { 168 | "version": "2.0.6", 169 | "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", 170 | "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" 171 | }, 172 | "asynckit": { 173 | "version": "0.4.0", 174 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", 175 | "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" 176 | }, 177 | "buffer-from": { 178 | "version": "1.1.1", 179 | "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", 180 | "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" 181 | }, 182 | "caseless": { 183 | "version": "0.11.0", 184 | "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz", 185 | "integrity": "sha1-cVuW6phBWTzDMGeSP17GDr2k99c=" 186 | }, 187 | "chalk": { 188 | "version": "4.1.0", 189 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", 190 | "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", 191 | "requires": { 192 | "ansi-styles": "^4.1.0", 193 | "supports-color": "^7.1.0" 194 | } 195 | }, 196 | "color-convert": { 197 | "version": "2.0.1", 198 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 199 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 200 | "requires": { 201 | "color-name": "~1.1.4" 202 | } 203 | }, 204 | "color-name": { 205 | "version": "1.1.4", 206 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 207 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" 208 | }, 209 | "combined-stream": { 210 | "version": "1.0.8", 211 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", 212 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", 213 | "requires": { 214 | "delayed-stream": "~1.0.0" 215 | } 216 | }, 217 | "concat-stream": { 218 | "version": "1.6.2", 219 | "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", 220 | "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", 221 | "requires": { 222 | "buffer-from": "^1.0.0", 223 | "inherits": "^2.0.3", 224 | "readable-stream": "^2.2.2", 225 | "typedarray": "^0.0.6" 226 | } 227 | }, 228 | "core-js": { 229 | "version": "3.6.5", 230 | "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.5.tgz", 231 | "integrity": "sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA==" 232 | }, 233 | "core-util-is": { 234 | "version": "1.0.2", 235 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", 236 | "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" 237 | }, 238 | "delayed-stream": { 239 | "version": "1.0.0", 240 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", 241 | "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" 242 | }, 243 | "form-data": { 244 | "version": "3.0.0", 245 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.0.tgz", 246 | "integrity": "sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg==", 247 | "requires": { 248 | "asynckit": "^0.4.0", 249 | "combined-stream": "^1.0.8", 250 | "mime-types": "^2.1.12" 251 | } 252 | }, 253 | "has-flag": { 254 | "version": "4.0.0", 255 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 256 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" 257 | }, 258 | "http-basic": { 259 | "version": "2.5.1", 260 | "resolved": "https://registry.npmjs.org/http-basic/-/http-basic-2.5.1.tgz", 261 | "integrity": "sha1-jORHvbW2xXf4pj4/p4BW7Eu02/s=", 262 | "requires": { 263 | "caseless": "~0.11.0", 264 | "concat-stream": "^1.4.6", 265 | "http-response-object": "^1.0.0" 266 | } 267 | }, 268 | "http-response-object": { 269 | "version": "1.1.0", 270 | "resolved": "https://registry.npmjs.org/http-response-object/-/http-response-object-1.1.0.tgz", 271 | "integrity": "sha1-p8TnWq6C87tJBOT0P2FWc7TVGMM=" 272 | }, 273 | "image-extensions": { 274 | "version": "1.1.0", 275 | "resolved": "https://registry.npmjs.org/image-extensions/-/image-extensions-1.1.0.tgz", 276 | "integrity": "sha1-uOa/YDnfAFbjM1AqALZjejEF2JQ=" 277 | }, 278 | "inherits": { 279 | "version": "2.0.4", 280 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 281 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" 282 | }, 283 | "is-image": { 284 | "version": "1.0.1", 285 | "resolved": "https://registry.npmjs.org/is-image/-/is-image-1.0.1.tgz", 286 | "integrity": "sha1-b9UadSoaERUG0GDZUhGLC5ibQm4=", 287 | "requires": { 288 | "image-extensions": "^1.0.1" 289 | } 290 | }, 291 | "is-image-url": { 292 | "version": "1.1.8", 293 | "resolved": "https://registry.npmjs.org/is-image-url/-/is-image-url-1.1.8.tgz", 294 | "integrity": "sha1-qmK/l1fFvlQCJpmcdMOiGtqYuDw=", 295 | "requires": { 296 | "is-image": "^1.0.1", 297 | "is-url": "^1.2.1", 298 | "sync-request": "^2.1.0" 299 | } 300 | }, 301 | "is-url": { 302 | "version": "1.2.4", 303 | "resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.4.tgz", 304 | "integrity": "sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==" 305 | }, 306 | "isarray": { 307 | "version": "1.0.0", 308 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", 309 | "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" 310 | }, 311 | "jpeg-js": { 312 | "version": "0.4.2", 313 | "resolved": "https://registry.npmjs.org/jpeg-js/-/jpeg-js-0.4.2.tgz", 314 | "integrity": "sha512-+az2gi/hvex7eLTMTlbRLOhH6P6WFdk2ITI8HJsaH2VqYO0I594zXSYEP+tf4FW+8Cy68ScDXoAsQdyQanv3sw==" 315 | }, 316 | "mime-db": { 317 | "version": "1.44.0", 318 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", 319 | "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" 320 | }, 321 | "mime-types": { 322 | "version": "2.1.27", 323 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", 324 | "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", 325 | "requires": { 326 | "mime-db": "1.44.0" 327 | } 328 | }, 329 | "node-fetch": { 330 | "version": "2.6.1", 331 | "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", 332 | "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==" 333 | }, 334 | "opentype.js": { 335 | "version": "0.4.11", 336 | "resolved": "https://registry.npmjs.org/opentype.js/-/opentype.js-0.4.11.tgz", 337 | "integrity": "sha1-KBojkGOcwVkxyVXY1jwUp8d3K0E=" 338 | }, 339 | "os-shim": { 340 | "version": "0.1.3", 341 | "resolved": "https://registry.npmjs.org/os-shim/-/os-shim-0.1.3.tgz", 342 | "integrity": "sha1-a2LDeRz3kJ6jXtRuF2WLtBfLORc=" 343 | }, 344 | "parse-data-url": { 345 | "version": "4.0.1", 346 | "resolved": "https://registry.npmjs.org/parse-data-url/-/parse-data-url-4.0.1.tgz", 347 | "integrity": "sha512-W+ZgeHPkG2Awbj2RCGG3zALoKGoKucIWXRp8jPgTVNmRgiftXbwXXzzaXXH4L1+OdxeSXC6C8G+hzlcv41f24A==", 348 | "requires": { 349 | "valid-data-url": "^4.0.0" 350 | } 351 | }, 352 | "pngjs": { 353 | "version": "3.4.0", 354 | "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-3.4.0.tgz", 355 | "integrity": "sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w==" 356 | }, 357 | "process-nextick-args": { 358 | "version": "2.0.1", 359 | "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", 360 | "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" 361 | }, 362 | "promise": { 363 | "version": "7.3.1", 364 | "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", 365 | "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", 366 | "requires": { 367 | "asap": "~2.0.3" 368 | } 369 | }, 370 | "pureimage": { 371 | "version": "0.2.5", 372 | "resolved": "https://registry.npmjs.org/pureimage/-/pureimage-0.2.5.tgz", 373 | "integrity": "sha512-D/oP8uaS8HLIOPqaxeVU0ZcJHUwvvFjeclKwn0RBeZJn3TBtZgKn7FVBN5auuCHQTC4K/wDAHfkY/JOuGCiohQ==", 374 | "requires": { 375 | "jpeg-js": "^0.4.1", 376 | "opentype.js": "^0.4.3", 377 | "pngjs": "^3.3.1" 378 | } 379 | }, 380 | "qs": { 381 | "version": "6.9.4", 382 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.4.tgz", 383 | "integrity": "sha512-A1kFqHekCTM7cz0udomYUoYNWjBebHm/5wzU/XqrBRBNWectVH0QIiN+NEcZ0Dte5hvzHwbr8+XQmguPhJ6WdQ==" 384 | }, 385 | "readable-stream": { 386 | "version": "2.3.7", 387 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", 388 | "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", 389 | "requires": { 390 | "core-util-is": "~1.0.0", 391 | "inherits": "~2.0.3", 392 | "isarray": "~1.0.0", 393 | "process-nextick-args": "~2.0.0", 394 | "safe-buffer": "~5.1.1", 395 | "string_decoder": "~1.1.1", 396 | "util-deprecate": "~1.0.1" 397 | } 398 | }, 399 | "regenerator-runtime": { 400 | "version": "0.13.7", 401 | "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", 402 | "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==" 403 | }, 404 | "safe-buffer": { 405 | "version": "5.1.2", 406 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 407 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" 408 | }, 409 | "spawn-sync": { 410 | "version": "1.0.15", 411 | "resolved": "https://registry.npmjs.org/spawn-sync/-/spawn-sync-1.0.15.tgz", 412 | "integrity": "sha1-sAeZVX63+wyDdsKdROih6mfldHY=", 413 | "requires": { 414 | "concat-stream": "^1.4.7", 415 | "os-shim": "^0.1.2" 416 | } 417 | }, 418 | "sprintf-js": { 419 | "version": "1.0.3", 420 | "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", 421 | "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" 422 | }, 423 | "string_decoder": { 424 | "version": "1.1.1", 425 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", 426 | "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", 427 | "requires": { 428 | "safe-buffer": "~5.1.0" 429 | } 430 | }, 431 | "supports-color": { 432 | "version": "7.2.0", 433 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 434 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 435 | "requires": { 436 | "has-flag": "^4.0.0" 437 | } 438 | }, 439 | "sync-request": { 440 | "version": "2.2.0", 441 | "resolved": "https://registry.npmjs.org/sync-request/-/sync-request-2.2.0.tgz", 442 | "integrity": "sha1-p70sES+glGPrkUnP8OnUKMR5do8=", 443 | "requires": { 444 | "concat-stream": "^1.4.7", 445 | "http-response-object": "^1.0.1", 446 | "spawn-sync": "^1.0.1", 447 | "then-request": "^2.0.1" 448 | } 449 | }, 450 | "then-request": { 451 | "version": "2.2.0", 452 | "resolved": "https://registry.npmjs.org/then-request/-/then-request-2.2.0.tgz", 453 | "integrity": "sha1-ZnizL6DKIY/laZgbvYhxtZQGDYE=", 454 | "requires": { 455 | "caseless": "~0.11.0", 456 | "concat-stream": "^1.4.7", 457 | "http-basic": "^2.5.1", 458 | "http-response-object": "^1.1.0", 459 | "promise": "^7.1.1", 460 | "qs": "^6.1.0" 461 | } 462 | }, 463 | "typedarray": { 464 | "version": "0.0.6", 465 | "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", 466 | "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" 467 | }, 468 | "util-deprecate": { 469 | "version": "1.0.2", 470 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", 471 | "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" 472 | }, 473 | "valid-data-url": { 474 | "version": "4.0.0", 475 | "resolved": "https://registry.npmjs.org/valid-data-url/-/valid-data-url-4.0.0.tgz", 476 | "integrity": "sha512-mV5E0AG/F2yPiJzYlhyooI83BLIV0i4h/ueZwdxr1Mh8ZeKKpcFZLbZbAAedL/PLd11sqIgppJBrb4SNXA0PMQ==" 477 | } 478 | } 479 | } 480 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@sashido/teachablemachine-node", 3 | "version": "1.2.2", 4 | "description": "Simplifies integration with Teachable Machine models from Google", 5 | "author": { 6 | "name": "Team SashiDo", 7 | "email": "hello@sashido.io" 8 | }, 9 | "license": "Apache-2.0", 10 | "repository": { 11 | "type": "git", 12 | "url": "git+https://github.com/SashiDo/teachablemachine-node.git" 13 | }, 14 | "bugs": { 15 | "url": "https://github.com/SashiDo/teachablemachine-node/issues" 16 | }, 17 | "engines": { 18 | "node": ">= 10.2.1" 19 | }, 20 | "keywords": [ 21 | "tensorflow", 22 | "tensorflowjs", 23 | "classification", 24 | "teachable machine", 25 | "google" 26 | ], 27 | "main": "index.js", 28 | "dependencies": { 29 | "@tensorflow/tfjs": "^2.3.0", 30 | "is-image-url": "^1.1.8", 31 | "node-fetch": "^2.6.0", 32 | "parse-data-url": "^4.0.1", 33 | "pureimage": "^0.2.5" 34 | }, 35 | "devDependencies": {}, 36 | "scripts": { 37 | "test": "echo \"Error: no test specified\" && exit 1" 38 | }, 39 | "contributors": [ 40 | "Yair Bonastre (https://github.com/bonastreyair)" 41 | ] 42 | } 43 | --------------------------------------------------------------------------------