Coder Social home page Coder Social logo

thebigpotatoe / node-red-contrib-face-recognition Goto Github PK

View Code? Open in Web Editor NEW
22.0 3.0 4.0 14.23 MB

A wrapper node for the epic Face-API.js library

JavaScript 68.76% HTML 31.24%
nodejs node-red node-red-contrib face-apijs face-recognition face-detection face-tracking age-and-gender facial-expressions facial-landmarks

node-red-contrib-face-recognition's Introduction

Top Languages

node-red-contrib-face-recognition's People

Contributors

dependabot[bot] avatar thebigpotatoe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

node-red-contrib-face-recognition's Issues

Text showing up as boxes on result image

Hi there!

I just tried this repo after talking with the OP on reddit.
But it seems like the results are coming through with a weird encoding (Or so it looks).

Is there anything that I could do to fix this?

image

fresh install - no fonts on detection

installed all on fresh ubuntu 20.40 lts server,
with node-red raspian script and face-detection with command-line like here stated,
but fonts on detected image missing.
what to do? thanx for help...

image

(by the way: i had to delete the image node and drag it new onto the flow to get it work)

Compatibility issue witn Node-Red V1.1.2

Thanks again for the hard work and the late nights :)

The latest Node-Red version 1.1.2 is conficting with [email protected]
Here's the error message:

Error: The Node.js native addon module (tfjs_binding.node) can not be found at path: C:\Users*username*.node-red\node_modules@tensorflow\tfjs-node\lib\napi-v5\tfjs_binding.node. Please run command 'npm rebuild @tensorflow/tfjs-node build-addon-from-source' to rebuild the native addon module. If you have problem with building the addon module, please check https://github.com/tensorflow/tfjs/blob/master/tfjs-node/WINDOWS_TROUBLESHOOTING.md or file an issue. (line:10)

Thanks!

Can't install at Raspberry Pi 4

maybe canvas can not support arm CPU ?

.921Z Install : node-red-contrib-face-recognition 1.3.2

2019-12-26T20:06:46.105Z npm install --no-audit --no-update-notifier --save --save-prefix="~" --production [email protected]
2019-12-26T20:06:56.979Z [out]
2019-12-26T20:06:56.979Z [out] > [email protected] install /home/pi/.node-red/node_modules/canvas
2019-12-26T20:06:56.979Z [out] > node-pre-gyp install --fallback-to-build
2019-12-26T20:06:56.979Z [out]
2019-12-26T20:06:57.435Z [err] node-pre-gyp
2019-12-26T20:06:57.439Z [err]
2019-12-26T20:06:57.439Z [err] WARN
2019-12-26T20:06:57.439Z [err]
2019-12-26T20:06:57.439Z [err] Using needle for node-pre-gyp https download
2019-12-26T20:06:57.440Z [err]
2019-12-26T20:06:58.469Z [err] node-pre-gyp
2019-12-26T20:06:58.469Z [err] WARN Tried to download(404): https://github.com/node-gfx/node-canvas-prebuilt/releases/download/v2.6.1/canvas-v2.6.1-node-v64-linux-glibc-arm.tar.gz
2019-12-26T20:06:58.470Z [err] node-pre-gyp WARN
2019-12-26T20:06:58.470Z [err] Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, glibc) (falling back to source compile with node-gyp)
2019-12-26T20:07:00.999Z [err] Package pixman-1 was not found in the pkg-config search path.
2019-12-26T20:07:00.999Z [err] Perhaps you should add the directory containing pixman-1.pc' 2019-12-26T20:07:00.999Z [err] to the PKG_CONFIG_PATH environment variable 2019-12-26T20:07:00.999Z [err] No package 'pixman-1' found 2019-12-26T20:07:00.999Z [err] gyp: Call to 'pkg-config pixman-1 --libs' returned exit status 1 while in binding.gyp. while trying to load binding.gyp 2019-12-26T20:07:01.016Z [err] gyp 2019-12-26T20:07:01.017Z [err] 2019-12-26T20:07:01.017Z [err] ERR! configure error 2019-12-26T20:07:01.017Z [err] 2019-12-26T20:07:01.018Z [err] gyp 2019-12-26T20:07:01.018Z [err] ERR! stack 2019-12-26T20:07:01.019Z [err] Error: gypfailed with exit code: 1 2019-12-26T20:07:01.019Z [err] gyp ERR! 2019-12-26T20:07:01.019Z [err] stack at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16) 2019-12-26T20:07:01.019Z [err] gyp ERR! 2019-12-26T20:07:01.019Z [err] stack at ChildProcess.emit (events.js:198:13) 2019-12-26T20:07:01.019Z [err] gyp 2019-12-26T20:07:01.019Z [err] ERR! 2019-12-26T20:07:01.019Z [err] stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12) 2019-12-26T20:07:01.020Z [err] gyp 2019-12-26T20:07:01.020Z [err] ERR! System Linux 4.19.75-v7l+ 2019-12-26T20:07:01.020Z [err] gyp 2019-12-26T20:07:01.020Z [err] ERR! command 2019-12-26T20:07:01.020Z [err] "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/home/pi/.node-red/node_modules/canvas/build/Release/canvas.node" "--module_name=canvas" "--module_path=/home/pi/.node-red/node_modules/canvas/build/Release" "--napi_version=5" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v64" 2019-12-26T20:07:01.020Z [err] gyp ERR! 2019-12-26T20:07:01.020Z [err] cwd /home/pi/.node-red/node_modules/canvas 2019-12-26T20:07:01.021Z [err] gyp 2019-12-26T20:07:01.021Z [err] ERR! node -v 2019-12-26T20:07:01.021Z [err] v10.18.0 2019-12-26T20:07:01.021Z [err] gyp 2019-12-26T20:07:01.021Z [err] ERR! 2019-12-26T20:07:01.021Z [err] node-gyp -v v5.0.5 2019-12-26T20:07:01.021Z [err] gyp 2019-12-26T20:07:01.021Z [err] ERR! not ok 2019-12-26T20:07:01.021Z [err] 2019-12-26T20:07:01.028Z [err] node-pre-gyp 2019-12-26T20:07:01.028Z [err] ERR! build error 2019-12-26T20:07:01.029Z [err] node-pre-gyp 2019-12-26T20:07:01.029Z [err] ERR! stack 2019-12-26T20:07:01.029Z [err] Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/pi/.node-red/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/home/pi/.node-red/node_modules/canvas/build/Release --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1) 2019-12-26T20:07:01.029Z [err] node-pre-gyp 2019-12-26T20:07:01.029Z [err] ERR! stack at ChildProcess.<anonymous> (/home/pi/.node-red/node_modules/node-pre-gyp/lib/util/compile.js:83:29) 2019-12-26T20:07:01.029Z [err] node-pre-gyp ERR! 2019-12-26T20:07:01.029Z [err] stack at ChildProcess.emit (events.js:198:13) 2019-12-26T20:07:01.029Z [err] node-pre-gyp ERR! 2019-12-26T20:07:01.030Z [err] stack at maybeClose (internal/child_process.js:982:16) 2019-12-26T20:07:01.030Z [err] node-pre-gyp ERR! 2019-12-26T20:07:01.030Z [err] stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5) 2019-12-26T20:07:01.031Z [err] node-pre-gyp 2019-12-26T20:07:01.031Z [err] ERR! System Linux 4.19.75-v7l+ 2019-12-26T20:07:01.031Z [err] node-pre-gyp 2019-12-26T20:07:01.031Z [err] ERR! command 2019-12-26T20:07:01.031Z [err] "/usr/bin/node" "/home/pi/.node-red/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" 2019-12-26T20:07:01.031Z [err] node-pre-gyp ERR! 2019-12-26T20:07:01.031Z [err] cwd 2019-12-26T20:07:01.031Z [err] /home/pi/.node-red/node_modules/canvas 2019-12-26T20:07:01.031Z [err] node-pre-gyp 2019-12-26T20:07:01.031Z [err] ERR! 2019-12-26T20:07:01.032Z [err] node -v v10.18.0 2019-12-26T20:07:01.032Z [err] node-pre-gyp 2019-12-26T20:07:01.032Z [err] ERR! node-pre-gyp -v 2019-12-26T20:07:01.032Z [err] v0.11.0 2019-12-26T20:07:01.032Z [err] node-pre-gyp 2019-12-26T20:07:01.032Z [err] ERR! not ok 2019-12-26T20:07:01.032Z [err] 2019-12-26T20:07:01.033Z [out] Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/pi/.node-red/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/home/pi/.node-red/node_modules/canvas/build/Release --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1) 2019-12-26T20:07:01.723Z [err] npm 2019-12-26T20:07:01.723Z [err] ERR! code ELIFECYCLE 2019-12-26T20:07:01.724Z [err] npm 2019-12-26T20:07:01.724Z [err] ERR! errno 2019-12-26T20:07:01.725Z [err] 1 2019-12-26T20:07:01.730Z [err] npm 2019-12-26T20:07:01.732Z [err] ERR! [email protected] install:node-pre-gyp install --fallback-to-build`
2019-12-26T20:07:01.732Z [err] npm ERR! Exit status 1
2019-12-26T20:07:01.732Z [err] npm ERR!
2019-12-26T20:07:01.732Z [err] npm ERR! Failed at the [email protected] install script.
2019-12-26T20:07:01.732Z [err] npm ERR!
2019-12-26T20:07:01.732Z [err] This is probably not a problem with npm. There is likely additional logging output above.
2019-12-26T20:07:01.791Z [err]
2019-12-26T20:07:01.792Z [err] npm ERR! A complete log of this run can be found in:
2019-12-26T20:07:01.792Z [err] npm ERR! /home/pi/.npm/_logs/2019-12-26T20_07_01_770Z-debug.log
2019-12-26T20:07:01.823Z rc=1

Canvas Install Errors on docker

I have the same problem as [https://github.com//issues/4](this issue).

I tried the root solution but when I connect inside container with root and install.
I get the same error :

bash-5.0# whoami
root
bash-5.0# cd /data/
bash-5.0# npm install node-red-contrib-face-recognition

> [email protected] install /data/node_modules/canvas
> node-pre-gyp install --fallback-to-build

sh: node-pre-gyp: Permission denied
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-04-22T15_37_16_722Z-debug.log

Can you help me with this ?
Thanks

How to train faces for facial recognition.

Hi there! I just started using this node and am having a hard time understanding how to tech faces linked to names for facial recognition.

I have tried adding a descriptor called Sheldon.jpg to detect the face of sheldon in the demo, but it doesn't seem to work.

Am I doing something wrong?

Not really an issue. Questions...

Sorry to use an issue post to ask questions. I did not know how else to do it.

I have been away form the facial recognition process since figuring out the Canvas install error from a year ago already. LIfe just got in the way. :)

2 questions:

  1. I see that it has been a little over a year since any updates. I assume for you too that life got in the way? Do you have any plans to continue the maintenance on this project?
  2. I would like so spawn a child process on another machine. Actually, a Jetson Nano. It was not evident to me how I could do this if I even could. Thoughts?

Thanks

Joe

UnhandledPromiseRejectionWarning - in newer tfjs version 1.7.2

UnhandledPromiseRejectionWarning Error in newer tfjs 1.7.2 version.

27 Apr 17:26:22 - [error] (node:2744) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 6)

comment: latest Tensorflow,js is now fixed and working fine with other node-red nodes,
like: node-red-contrib-tfjs-coco-ssd

Error to install

Hello,

I have tried to install it from Node red, but I got following error message:

021-06-22T17:53:32.090Z Install : node-red-contrib-face-recognition 2.0.3

2021-06-22T17:53:32.825Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production [email protected]
2021-06-22T17:53:45.352Z [out]
2021-06-22T17:53:45.352Z [out] > [email protected] install /home/pi/.node-red/node_modules/canvas
2021-06-22T17:53:45.352Z [out] > node-pre-gyp install --fallback-to-build
2021-06-22T17:53:45.352Z [out]
2021-06-22T17:53:46.295Z [err] node-pre-gyp
2021-06-22T17:53:46.296Z [err] ERR! install response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.8.0/canvas-v2.8.0-node-v83-linux-glibc-arm.tar.gz

Ig I test URL https://github.com/Automattic/node-canvas/releases/download/v2.8.0/canvas-v2.8.0-node-v83-linux-glibc-arm.tar.gz, I got erroer message "Not found"

Thanks in advanced

Other msg value not sent over

other msg field that has been set before face detection is not send
or is there any configuration that I miss.
Thankyou

Canvas Install Errors

I am getting canvas install errors when the install tries to create some sub directories under node_modules. I am getting permission errors.

I ran the install with sudo. I also tried creating all of the canvas directories ahead of time but still failing.

Joe

Error to recognition

Hi,
I have this error by using your flow ...

"No descriptor file found for 7c9cec36.49682c"
but I have uploaded the image and It seems that the node don't save the description, in fact in my pc I don't find a file 7c9cec36.49682c.json

Can you help me?

PC with Ubuntu 20.04
Node-RED version: v1.2.9
Node.js version: v14.16.0
Linux 5.4.0-81-generic x64 LE

err

Can possible to recognition from own image

Hello i need a solution to recognition my image from database e.g. i have 5 image name Tony

and i use that 5 image recognition from webcam image or another source image

thank for help

bounding box coordinates

Hi,
Healthy new year !
I installed node-red-contrib-face-recognition without problems on a Raspbery Pi4.

I found the bounding box surrounding the facial landmarks: payload.face_recon.faces[0].alignedRect._box
But I would need the coordinated for the larger bounding box covering the whole face - (as shown in the preview (box with blue lines)

Any help very appreciated !

Best regards,
Wolfgang

Image is not displaying through the image output node

Hi again :-)
Since version 1.3.1, I get "Invalid image" error message,
when trying to display image through the image output node.

image

I tried to use the "msg.payload=msg.image" or even connect it directly to the the image output node - but no luck.

Appreciate the effort. Thanks!

How do you "see" who is whom in the pictures?

I now have this working using a windows computer, and that's strange in it's own way, BUT....

If I teach the node that Sheldon is actually Sheldon and Lennard is Lennard, the node "just" puts out information which leaves me with no clue what so ever.

Another test I did was, feed the flow with the picture I used for Sheldon as the descriptor, while passing this though with both Lennard and Sheldon as possible in the picture.

Does this make sence?

Picture-in of Sheldon - 2 possible candidates (Sheldon & Lennard) - Node puts out outcome for both possibilities :(

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.