dceejay / tfjs-coco-ssd

Node-RED node for tensorflowjs coco ssd
Apache License 2.0
14 stars 9 forks source link

Quick start guide #3

Closed SnaKKo closed 4 years ago

SnaKKo commented 4 years ago

Hi, i've added the node in my node-red installation, I've read in the README.md this:

The CoCo-ssd model is loaded locally so it should work offline.

But in the model url (node configuration) I see this url "http://localhost:1880/coco/model.json" but it returns a 404 (I have used the correct host) so I imagine I have to download the model first, right?

If so, where I can download it? More precisally, i visited this page:

http://cocodataset.org/#download

But i don't know what to download because i'm a newbie :D So i'm here to ask help and suggest to write a "Quick start guide" for newbies like me.

Thanks a lot!

SnaKKo commented 4 years ago

When I deploy I receive this error:

Error: Cannot find module '/home/daniele/.node-red/node_modules/@tensorflow/tfjs-node/lib/napi-v/tfjs_binding.node'

dceejay commented 4 years ago

What platform / OS are you running on ? The tfjs module only runs on some hardware (nothing 32bit for example) so may or may not work... certainly the not finding the binding will be casuing the first thing you reported as the node isn't running correctly. The model is already downloaded as part of the node so you don't need to get it. You can remove the url totally and it will then automatically fetch it from the web - but again - without the binding it won't work anyway.

When you installed it - what did the log say ? - Or may use the command line to install and report what it says when you retry.

SnaKKo commented 4 years ago

I've removed and reinstalled by cli, I executed "npm install node-red-contrib-tfjs-coco-ssd" inside my home "~/.node-red", without root.

@tensorflow/tfjs-node@1.4.0 install /home/daniele/.node-red/node_modules/@tensorflow/tfjs-node node scripts/install.js

CPU-linux-1.4.0.tar.gz

node-red-project@0.0.1 /home/daniele/.node-red ├── node-red-configurable-ping@1.0.1 ├── node-red-contrib-tfjs-coco-ssd@0.3.2 extraneous └─┬ node-red-dashboard@2.19.4 ├─┬ compression@1.7.4 │ └── safe-buffer@5.1.2 └─┬ socket.io@2.3.0 ├─┬ debug@4.1.1 │ └── ms@2.1.2 ├─┬ engine.io@3.4.0 │ ├── UNMET PEER DEPENDENCY bufferutil@^4.0.1 │ ├─┬ debug@4.1.1 │ │ └── ms@2.1.2 │ └── UNMET PEER DEPENDENCY utf-8-validate@^5.0.2 ├─┬ socket.io-client@2.3.0 │ ├─┬ debug@4.1.1 │ │ └── ms@2.1.2 │ └─┬ engine.io-client@3.4.0 │ └─┬ debug@4.1.1 │ └── ms@2.1.2 └─┬ socket.io-parser@3.4.0 └─┬ debug@4.1.1 └── ms@2.1.2

npm WARN multiple-select@1.5.2 requires a peer of jquery@1.9.1 - 3 but none was installed. npm WARN ws@7.2.1 requires a peer of bufferutil@^4.0.1 but none was installed. npm WARN ws@7.2.1 requires a peer of utf-8-validate@^5.0.2 but none was installed.

SnaKKo commented 4 years ago

daniele@domotics:~/.node-red$ node -v v8.10.0

SnaKKo commented 4 years ago

Maybe I'm in the right path, I've updated node to last version :-) thanks

SnaKKo commented 4 years ago

Ok, it works but I think there is a memory leak somewhere

dceejay commented 4 years ago

As it's now running I'm going to close this issue. tfjs is a beast and depending on the model can take excessive amounts of memory (especially on a Pi)