Git Product home page Git Product logo

Comments (18)

thebigpotatoe avatar thebigpotatoe commented on August 27, 2024

Hmm, interesting. I haven't played with this repo in a while. Maybe canvas has updated.

What platform are you using for this. A raspberry pi?

from node-red-contrib-face-recognition.

jmorris644 avatar jmorris644 commented on August 27, 2024

Yes, on a Pi.

from node-red-contrib-face-recognition.

jmorris644 avatar jmorris644 commented on August 27, 2024

I have also tried a direct install of canvas and with the --build-from-source option as well. I am using sudo but still getting permission errors.

from node-red-contrib-face-recognition.

thebigpotatoe avatar thebigpotatoe commented on August 27, 2024

This sounds like a canvas issue then, not so much this repo. I just popped over to the canvas GitHub page, and I can't see any open issues regards a pi install.

I don't usually built with the pi for these reasons, its just annoying to debug. It certainly seems though from your description that's it's just permission errors so maybe googling around on how to build the canvas package could bring up some more results?

When I get some spare time I want to install this on a pi so I can use it as a remote server. Until then I'm afraid I'm not going to be much help.

from node-red-contrib-face-recognition.

thebigpotatoe avatar thebigpotatoe commented on August 27, 2024

Just having a look around, did you follow this at all?

from node-red-contrib-face-recognition.

jmorris644 avatar jmorris644 commented on August 27, 2024

Yes. I have tried everything that I am able to find via searching. It is definitely Canvas itself.
When I find a solution I will post it here.

from node-red-contrib-face-recognition.

thebigpotatoe avatar thebigpotatoe commented on August 27, 2024

Ah annoying,

Any chance you can post a log of the install, see if there is any relevant info in that?

from node-red-contrib-face-recognition.

jmorris644 avatar jmorris644 commented on August 27, 2024

I read somewhere that you need to be root to install canvas. I tried that and it worked.

Everything in the log was simple permission errors to create sub directories. Even though I was using Sudo.

from node-red-contrib-face-recognition.

jmorris644 avatar jmorris644 commented on August 27, 2024

Also, in your README.md you might want to mention the additional nodes that need to get installed for your flow to work. Took me a little bit to find the Image one.

from node-red-contrib-face-recognition.

thebigpotatoe avatar thebigpotatoe commented on August 27, 2024

Also, in your README.md you might want to mention the additional nodes that need to get installed for your flow to work. Took me a little bit to find the Image one.

Apologies for this, I thought I had for this repo, but ust have been thinking of another. Ill fix that up now.

I read somewhere that you need to be root to install canvas. I tried that and it worked.

Good news. Does this allow you to run the node correctly now?

from node-red-contrib-face-recognition.

jmorris644 avatar jmorris644 commented on August 27, 2024

Good news. Does this allow you to run the node correctly now?

yes

from node-red-contrib-face-recognition.

thebigpotatoe avatar thebigpotatoe commented on August 27, 2024

Awesome, glad its working then. I will close and pin this for others. Thanks for the info.

from node-red-contrib-face-recognition.

efmopa avatar efmopa commented on August 27, 2024

Además, en su archivo README.md es posible que desee mencionar los nodos adicionales que deben instalarse para que su flujo funcione. Me llevó un poco encontrar la imagen.

please, where is the readme.md file?

from node-red-contrib-face-recognition.

manolisstam avatar manolisstam commented on August 27, 2024

trying to install on pi4, not working!
npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build

from node-red-contrib-face-recognition.

thebigpotatoe avatar thebigpotatoe commented on August 27, 2024

Have a look at the other issues for canvas install errors.

#4 (comment)

from node-red-contrib-face-recognition.

manolisstam avatar manolisstam commented on August 27, 2024

Have a look at the other issues for canvas install errors.

#4 (comment)

thank you so much for your answer,
tried root npm but nothing good. on ubuntu there is no problem but in pi4.... i could not make it

from node-red-contrib-face-recognition.

thebigpotatoe avatar thebigpotatoe commented on August 27, 2024

I have been meaning to look into this as I have migrated all of my operations to embedded recently (mostly pi 4).

If it works on linux but not the Pi, my guess is its the ARM architecture that's the issue.

Seems there are a few issues related to ARM over on the canvas repo which might suggest this is the error as well:

Automattic/node-canvas#1662

When I first built this node, I really tried to get rid of canvas to make it more portable, but unfortunately Face-API.js uses its functionality with no way around it.

In the mean time if you manage to find a solution feel free to post it back here, or make a pull :)

from node-red-contrib-face-recognition.

timdonovanuk avatar timdonovanuk commented on August 27, 2024

Hello, me again :) Thought I'd take a look at this.

19 Apr 20:39:23 - [info] Installing module: node-red-contrib-face-recognition, version: 1.3.3
19 Apr 20:39:33 - [warn] Installation of module node-red-contrib-face-recognition failed:
19 Apr 20:39:33 - [warn] ------------------------------------------
19 Apr 20:39:33 - [warn] npm WARN deprecated [email protected]: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
node-pre-gyp WARN Using request for node-pre-gyp https download 
node-pre-gyp WARN Tried to download(404): https://github.com/Automattic/node-canvas/releases/download/v2.7.0/canvas-v2.7.0-node-v64-linux-musl-x64.tar.gz 
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, musl) (falling back to source compile with node-gyp) 
/bin/sh: pkg-config: not found
gyp: Call to 'pkg-config pixman-1 --libs' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1

I'm running the latest node-red docker image (official) and just being root isn't enough. There is no canvas (or issues building it) on alpine (the distro the node-red container runs on).

To fix issues open a terminal into the node-red container and run:

apk add --no-cache \
    python \
    g++ \
    build-base \
    cairo-dev \
    jpeg-dev \
    pango-dev \
    musl-dev \
    giflib-dev \
    pixman-dev \
    pangomm-dev \
    libjpeg-turbo-dev \
    freetype-dev \
    && npm install [email protected]

You can then install node-red-contrib-face-recognition into node-red:

19 Apr 20:44:30 - [info] Installing module: node-red-contrib-face-recognition, version: 1.3.3
19 Apr 20:44:51 - [info] Installed module: node-red-contrib-face-recognition
19 Apr 20:44:51 - [info] [Face-api.js] - TensorFlow.js for Node.js was not found, running without it
19 Apr 20:44:51 - [info] [Face-api.js] - Loading Models
19 Apr 20:44:51 - [info] [Face-a-pi.js] - Created descriptors directory at /data/node_modules/node-red-contrib-face-recognition/descriptors
============================
Hi there 👋. Looks like you are running TensorFlow.js in Node.js. To speed things up dramatically, install our node backend, which binds to TensorFlow C++, by running npm i @tensorflow/tfjs-node, or npm i @tensorflow/tfjs-node-gpu if you have CUDA. Then call require('@tensorflow/tfjs-node'); (-gpu suffix for CUDA) at the start of your program. Visit https://github.com/tensorflow/tfjs-node for more details.
============================
19 Apr 20:44:51 - [info] Added node types:
19 Apr 20:44:51 - [info]  - node-red-contrib-face-recognition:face-api-input
19 Apr 20:44:51 - [info]  - node-red-contrib-face-recognition:face-api-compute
19 Apr 20:44:53 - [info] [Face-api.js] - Models Loaded

Hurray! Yet to confirm the nodes actually work of course..but...baby steps!

Edit:

Terrifying!

image

from node-red-contrib-face-recognition.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.