tensorflow.js

how to read video Frames directly into memory with Nodejs?

假装没事ソ 提交于 2020-06-17 06:46:22
问题 What i am trying to do is taking a video and diving it to frames and passing this frames to a Model to detect objects in each frame but the problem is the extraction process cost so much time and i don't need the frames on my disk. 回答1: fmpeg-stream offers stream capabilities. So there is no need to write to a file. It is also possible to use directly ffmpeg and spawn a new child process. Its .stdout property is a readable stream. On the event data, the chunk can be read. const fs = require(

how to read video Frames directly into memory with Nodejs?

旧城冷巷雨未停 提交于 2020-06-17 06:45:33
问题 What i am trying to do is taking a video and diving it to frames and passing this frames to a Model to detect objects in each frame but the problem is the extraction process cost so much time and i don't need the frames on my disk. 回答1: fmpeg-stream offers stream capabilities. So there is no need to write to a file. It is also possible to use directly ffmpeg and spawn a new child process. Its .stdout property is a readable stream. On the event data, the chunk can be read. const fs = require(

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

load model.json for tensorflowjs in reactjs not working

∥☆過路亽.° 提交于 2020-06-15 10:29:32
问题 I'm trying to load a model.json file with it's weights.bin from the root directory in my react app. When I call an example I found online from storage.googleapis.com it works but loading from my root doesn't. The contents of App.js in my react app... import React from "react"; import "./styles.css"; const tf = require("@tensorflow/tfjs"); // example model - working async function predict() { const model = await tf.loadGraphModel( "https://storage.googleapis.com/tfjs-models/savedmodel

load model.json for tensorflowjs in reactjs not working

心已入冬 提交于 2020-06-15 10:29:06
问题 I'm trying to load a model.json file with it's weights.bin from the root directory in my react app. When I call an example I found online from storage.googleapis.com it works but loading from my root doesn't. The contents of App.js in my react app... import React from "react"; import "./styles.css"; const tf = require("@tensorflow/tfjs"); // example model - working async function predict() { const model = await tf.loadGraphModel( "https://storage.googleapis.com/tfjs-models/savedmodel

What's the attention model used in tfjs-examples/date-conversion-attention?

北战南征 提交于 2020-05-17 08:33:46
问题 I've been looking at tfjs examples and trying to learn about seq2seq models. During the process, I've stumbled upon the date-conversion-attention example. It's a great example but what kind of attention mechanism is being used in the example? There is no info in Readme file. Can somebody point me to the paper that describes the attention that's being used here? Link to attention part: https://github.com/tensorflow/tfjs-examples/blob/908ee32750ba750a14d15caeb53115e2d3dda2b3/date-conversion

Tensorflow js VS Tensorflow Lite

旧时模样 提交于 2020-05-16 03:52:10
问题 Quite an open-ended question. Just pretty curious whats the current difference if I want to deploy a machine learning (object detection) model on the browser, perhaps on a webapp to begin with (to be viewed on a phone). From what I know, both tensorflowjs and tensorflowlite are compatible for such a deployment. (I've heard tensorflowlite is superior but, curious to find the pros and cons if any) What are the main differences between them? Will tensorflowjs be a good choice too? 回答1: main

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

书本:来吧,证明你爱我的时候到了!

不打扰是莪最后的温柔 提交于 2020-04-24 12:49:19
项目体验地址: at.iunitv.cn/ 效果预览: 花絮: 读书节马上就要到了,相信很多小伙伴嘴上说着学不动了,其实身体还是很诚实的。 毕竟读书还是有很多好处的:比如让你的脑门散发智慧的光芒,再或者让你有理由说因为读书太忙了所以没有女朋友等等。 所以在这个特殊的日子里,你这一年的图书我们承包了。不为别的,只为帮助在座的各位在2020年能够遇见更好的自己! 今天的主题仅仅是送图书,我们也想要借助这个特殊的机会,普及一下Tensorflow相关的知识,我们会用TensorFlow.js做一个图书识别的模型,并在Vue Application中运行,赋予网页识别图书的能力。 本文讲述了AI相关的概念知识和如何运用SSD Mobile Net V1模型进行迁移学习的方法,从而帮助大家完成一个可以在网页上运行的图书识别模型。 正文: 什么是迁移学习 迁移学习和域适应指的是在一种环境中学到的知识被用在另一个领域中来提高它的泛化性能。——《深度学习》,第 526 页 再简单一点理解,以今天图书识别模型训练为例,我们利用前人训练好的具备图片识别能力的AI模型,保留AI模型中对图片特征提取的能力的基础上再训练,使AI模型具备识别图书的能力。 迁移学习能够大大提高模型训练的速度,并达到相对不错的正确率。 而我们今天所要迁移学习的对象就是SSD Mobile Net V1模型

Cant find \node_modules\@tensorflow\tfjs-node\lib\napi-v4\tfjs_binding.node

我是研究僧i 提交于 2020-04-13 17:26:12
问题 I have tried to get the tensorflow.js library to work for days now. I have installed on my computer Python 2.7 Visual Studio 2019 Node 12.13.0 This is the steps I've done to produce the error: Create empty folder npm init inside the folder npm install --save @tensorflow/tfjs-node created a index.js file added 1 line : require('@tensorflow/tfjs-node') tried to run node index.js got this error: C:\Users\kim_1\Desktop\workplz>node index.js internal/modules/cjs/loader.js:1003 return process