tfjs-node

Tensorflow Node-js, TypeError: Only HTTP(S) protocols are supported

你说的曾经没有我的故事 提交于 2021-01-28 02:09:01
问题 I am trying to load a local tensorflowjs model on my Node server but am getting the error: UnhandledPromiseRejectionWarning: TypeError: Only HTTP(S) protocols are supported. This is how I am importing the Tensorflowjs packages: const tf = require('@tensorflow/tfjs'); require('@tensorflow/tfjs-node'); global.fetch = require('node-fetch') and loading the model like this: const ssd_model_path = 'file://models/ssd_model/model.json' this.model = await tf.loadLayersModel(ssd_model_path); My

Handpose tfjs Error - No backend found in registry

我是研究僧i 提交于 2020-06-17 00:03:02
问题 When trying to run a demo project for Handpose tfjs, I get the below error. My package.json file has below dependencies: { "name": "tensorflowJs", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "watch": "cross-env NODE_ENV=development parcel index.html --no-hmr ", "build": "cross-env NODE_ENV=production parcel build index.html --public-url ./" }, "browser": { "crypto": false }, "keywords": [], "author": "", "license": "ISC", "dependencies": { "@tensorflow-models

Error: The specified module could not be found. \\?\C:\Program Files\nodejs\tf\node_modules\@tensorflow\tfjs-node\lib\napi-v5\tf js_binding.node

天涯浪子 提交于 2020-04-30 07:09:39
问题 I am getting an error when importing '@tensorflow/tfjs-node' module. My problem is similar to that mentioned in Cannot import @tensorflow/tfjs-node in nodejs TensorFlow.js version- 1.7.3 Platform informations: Windows 8.1 Python 2.7.12 npm 6.14.4 node 10.20.1 Package.json is as follows: { "name": "tf", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC", "dependencies": { "@tensorflow

Different predictions if running in Node instead of Browser (using the same model_web - python converted model)

删除回忆录丶 提交于 2020-03-04 18:56:18
问题 pretty new to ML and tensorflow! I made an object detection model with http://cloud.annotations.ai that permits to train and convert a model in different formats, tfjs (model_web) too. That website provides also boilerplates for running the model within a browser (react app)... just like you do - probably it is the same code, didn't spend enough time. So I have this model running inside a browser, giving prediction about objects in a photo with pretty good results considering the amount of