Giter VIP home page Giter VIP logo

node-red-contrib-model-asset-exchange's Introduction

Build Status npm version

Node-RED nodes for deep learning microservices from the Model Asset eXchange, providing support for common audio, image, video, and text processing tasks.

Sample Node-RED Flow for MAX Object Detector

Getting started

To get started follow the comprehensive tutorial or complete the quick start steps listed below.

Setup

Docker installation

If you have Docker installed, you can use this Docker image to try out the examples.

Native installation

  1. Install Node-RED.

    Before you can install Node-RED, you'll need a working install of Node.js. We recommend the use of Node.js LTS 8.x or 10.x, as Node-RED no longer supports Node.js 6.x or earlier.

  2. Run the following command in your Node-RED user directory - typically ~/.node-red to install the node-red-contrib-model-asset-exchange module:

     $ cd ~/.node-red
     $ npm install node-red-contrib-model-asset-exchange
    

You can also install the module in the Node-RED editor. Choose > Manage palette > Install and enter model-asset as the search term.

  1. Launch Node-RED and open the displayed URL in a web browser to access the flow editor.

     $ node-red
       ...
       ... - [info] Server now running at http://127.0.0.1:1880/
    
  2. The nodes are displayed in the palette under the Model-Asset-eXchange category.

Explore the sample flows

The node-red-contrib-model-asset-exchange module includes a couple of example flows to get you started. To import the flows into the workspace:

  1. In the Node-RED editor open > Import > Examples > model asset exchange.

  2. Select one of the sub-directories to choose between the basic flows in getting started, some more complex examples in beyond the basics, or some flows designed to run on the raspberry pi.

  3. Choose a flow.

    import sample flows

Note: The flows utilize nodes from the node-red-contrib-browser-util and node-red-contrib-image-output modules. See the flow description for more details on which nodes are used in a particular example.

You can deploy and run these flows as is. The deep learning nodes in these flows have been pre-configured (service: cloud) to connect to hosted evaluation instances of the deep learning microservices.

Use the nodes in your own flows

Microservice evaluation instances are not suitable for production use. We recommend running microservice instance(s) on your local machine or in the cloud using IBM Cloud Kubernetes, Azure Kubernetes Service, or Google Kubernetes Engine:

  1. Deploy the deep learning microservice in the desired environment.
  2. Take note of its URL (e.g. http://localhost:5000)
  3. Add the corresponding deep learning node to your canvas.
  4. Open the node properties.
  5. Add a service entry for the URL and assign it a unique name.

configure microservice connectivity

Supported application domains

This Node-RED node module supports the following application domains:

Note: file inject node in node-red-contrib-browser-utils is useful to test these nodes.

License

Apache-2.0

node-red-contrib-model-asset-exchange's People

Contributors

bdwyer2 avatar kastentx avatar ptitzler avatar zuhito avatar zuhitocom avatar

Stargazers

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

Watchers

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

node-red-contrib-model-asset-exchange's Issues

Update Response Payload for Multiple-Entity Models

Following the format of the facial-emotion-classifier node, update the response payload for models that have the potential for predictions on more than one entity.

this includes:

  • object-detector
  • facial-recognizer
  • facial-age-estimator
  • image-segmenter
  • human-pose-estimator

Currently, the first prediction is returned as a string in msg.payload.

This change would convert msg.payload to an object with two properties: entitiesDetected which holds a number value, and prediction which holds an array containing the same number of predictions.

For example, a response with one prediction would look like:

msg.payload = {
  entitiesDetected: 1,
  prediction: ['person']
}

While a response with multiple entities/predictions would look like:

msg.payload = {
  entitiesDetected: 3,
  prediction: ['person', 'dog', 'chair']
}

Improve README

  • Add build status badge
    [![Build Status](https://travis-ci.org/CODAIT/node-red-contrib-model-asset-exchange.svg?branch=master)](https://travis-ci.org/CODAIT/node-red-contrib-model-asset-exchange)
  • Add npm package badge
    [![npm version](https://badge.fury.io/js/node-red-contrib-model-asset-exchange.svg)](https://badge.fury.io/js/node-red-contrib-model-asset-exchange)

...

Refactor /model/metadata tests

Some /model/metadata endpoint tests are failing because they perform a deep-compare of the returned response. Recently a couple of changes have been delivered to some models, which break those tests.

Add bounding box/visualization output to nodes

Certain models return coordinates for displaying bounding boxes or other visualization options.

Models that provide this kind of information in their response should have the option to include an augmented image in the output from the model node, like is currently done with the object-detector node.

The nodes that still need this output are:

  • facial age estimator
  • facial emotion classifier
  • facial recognizer
  • image segmenter
  • human pose estimator

Add sample Node-RED flow(s)

To illustrate how the nodes can be used:

Remaining nodes without a sample:

  • inception resnet v2
  • human pose estimator
  • facial age estimator

installation issues

Hello,
I'm having issues i stalling this on my raspberry node-red installation:

2019-05-11T11:32:47.269Z installieren : node-red-contrib-model-asset-exchange 0.2.3

2019-05-11T11:32:47.419Z npm install --no-audit --no-update-notifier --save --save-prefix="~" --production [email protected]
2019-05-11T11:33:02.998Z [err] npm
2019-05-11T11:33:02.999Z [err] WARN deprecated [email protected]: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
2019-05-11T11:33:03.688Z [err] npm
2019-05-11T11:33:03.689Z [err] WARN deprecated [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
2019-05-11T11:33:03.694Z [err] npm
2019-05-11T11:33:03.694Z [err] WARN deprecated [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
2019-05-11T11:33:03.699Z [err] npm
2019-05-11T11:33:03.700Z [err] WARN deprecated [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
2019-05-11T11:33:03.704Z [err] npm
2019-05-11T11:33:03.705Z [err] WARN deprecated [email protected]: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
2019-05-11T11:33:03.725Z [err] npm
2019-05-11T11:33:03.725Z [err] WARN deprecated [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
2019-05-11T11:33:12.346Z [out]
2019-05-11T11:33:12.346Z [out] > [email protected] install /home/pi/.node-red/node_modules/canvas
2019-05-11T11:33:12.346Z [out] > node-pre-gyp install --fallback-to-build
2019-05-11T11:33:12.346Z [out]
2019-05-11T11:33:13.622Z [err] node-pre-gyp
2019-05-11T11:33:13.623Z [err]
2019-05-11T11:33:13.624Z [err] WARN Using request for node-pre-gyp https download
2019-05-11T11:33:13.624Z [err]
2019-05-11T11:33:14.197Z [err] node-pre-gyp
2019-05-11T11:33:14.197Z [err] WARN Tried to download(404): https://github.com/node-gfx/node-canvas-prebuilt/releases/download/v2.5.0/canvas-v2.5.0-node-v57-linux-glibc-arm.tar.gz
2019-05-11T11:33:14.197Z [err] node-pre-gyp
2019-05-11T11:33:14.197Z [err] WARN Pre-built binaries not found for [email protected] and [email protected] (node-v57 ABI, glibc) (falling back to source compile with node-gyp)
2019-05-11T11:33:20.082Z [err] Package pixman-1 was not found in the pkg-config search path.
2019-05-11T11:33:20.082Z [err] Perhaps you should add the directory containing pixman-1.pc' 2019-05-11T11:33:20.082Z [err] to the PKG_CONFIG_PATH environment variable 2019-05-11T11:33:20.082Z [err] No package 'pixman-1' found 2019-05-11T11:33:20.088Z [err] gyp: Call to 'pkg-config pixman-1 --libs' returned exit status 1 while in binding.gyp. while trying to load binding.gyp 2019-05-11T11:33:20.117Z [err] gyp 2019-05-11T11:33:20.117Z [err] ERR! configure error 2019-05-11T11:33:20.117Z [err] 2019-05-11T11:33:20.119Z [err] gyp 2019-05-11T11:33:20.119Z [err] ERR! stack Error: gypfailed with exit code: 1 2019-05-11T11:33:20.119Z [err] gyp ERR! 2019-05-11T11:33:20.120Z [err] stack 2019-05-11T11:33:20.120Z [err] at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:345:16) 2019-05-11T11:33:20.120Z [err] gyp 2019-05-11T11:33:20.120Z [err] ERR! stack 2019-05-11T11:33:20.120Z [err] at emitTwo (events.js:126:13) 2019-05-11T11:33:20.120Z [err] gyp 2019-05-11T11:33:20.120Z [err] ERR! 2019-05-11T11:33:20.120Z [err] stack at ChildProcess.emit (events.js:214:7) 2019-05-11T11:33:20.120Z [err] gyp ERR! 2019-05-11T11:33:20.120Z [err] stack 2019-05-11T11:33:20.121Z [err] at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12) 2019-05-11T11:33:20.121Z [err] gyp 2019-05-11T11:33:20.121Z [err] ERR! System 2019-05-11T11:33:20.121Z [err] Linux 4.14.98-v7+ 2019-05-11T11:33:20.122Z [err] gyp 2019-05-11T11:33:20.122Z [err] ERR! 2019-05-11T11:33:20.122Z [err] command "/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=4" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v57" 2019-05-11T11:33:20.122Z [err] gyp 2019-05-11T11:33:20.122Z [err] ERR! 2019-05-11T11:33:20.122Z [err] cwd /home/pi/.node-red/node_modules/canvas 2019-05-11T11:33:20.123Z [err] gyp 2019-05-11T11:33:20.123Z [err] ERR! 2019-05-11T11:33:20.123Z [err] node -v v8.16.0 2019-05-11T11:33:20.123Z [err] gyp 2019-05-11T11:33:20.123Z [err] ERR! 2019-05-11T11:33:20.123Z [err] node-gyp -v v3.8.0 2019-05-11T11:33:20.123Z [err] gyp 2019-05-11T11:33:20.123Z [err] ERR! 2019-05-11T11:33:20.123Z [err] not ok 2019-05-11T11:33:20.132Z [err] node-pre-gyp 2019-05-11T11:33:20.134Z [err] ERR! build error 2019-05-11T11:33:20.134Z [err] node-pre-gyp 2019-05-11T11:33:20.134Z [err] ERR! stack 2019-05-11T11:33:20.135Z [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=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v57' (1) 2019-05-11T11:33:20.135Z [err] node-pre-gyp 2019-05-11T11:33:20.135Z [err] ERR! 2019-05-11T11:33:20.135Z [err] stack at ChildProcess.<anonymous> (/home/pi/.node-red/node_modules/node-pre-gyp/lib/util/compile.js:83:29) 2019-05-11T11:33:20.135Z [err] node-pre-gyp 2019-05-11T11:33:20.135Z [err] ERR! stack 2019-05-11T11:33:20.135Z [err] at emitTwo (events.js:126:13) 2019-05-11T11:33:20.135Z [err] node-pre-gyp 2019-05-11T11:33:20.135Z [err] ERR! 2019-05-11T11:33:20.135Z [err] stack at ChildProcess.emit (events.js:214:7) 2019-05-11T11:33:20.135Z [err] node-pre-gyp 2019-05-11T11:33:20.136Z [err] ERR! 2019-05-11T11:33:20.136Z [err] stack at maybeClose (internal/child_process.js:915:16) 2019-05-11T11:33:20.136Z [err] node-pre-gyp 2019-05-11T11:33:20.136Z [err] ERR! 2019-05-11T11:33:20.136Z [err] stack 2019-05-11T11:33:20.136Z [err] at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5) 2019-05-11T11:33:20.137Z [err] node-pre-gyp 2019-05-11T11:33:20.137Z [err] ERR! System 2019-05-11T11:33:20.137Z [err] Linux 4.14.98-v7+ 2019-05-11T11:33:20.137Z [err] node-pre-gyp 2019-05-11T11:33:20.137Z [err] ERR! 2019-05-11T11:33:20.137Z [err] command 2019-05-11T11:33:20.138Z [err] "/usr/bin/node" "/home/pi/.node-red/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" 2019-05-11T11:33:20.138Z [err] node-pre-gyp 2019-05-11T11:33:20.138Z [err] ERR! 2019-05-11T11:33:20.138Z [err] cwd /home/pi/.node-red/node_modules/canvas 2019-05-11T11:33:20.138Z [err] node-pre-gyp 2019-05-11T11:33:20.138Z [err] ERR! node -v 2019-05-11T11:33:20.138Z [err] v8.16.0 2019-05-11T11:33:20.138Z [err] node-pre-gyp 2019-05-11T11:33:20.139Z [err] ERR! 2019-05-11T11:33:20.139Z [err] node-pre-gyp -v v0.11.0 2019-05-11T11:33:20.139Z [err] node-pre-gyp 2019-05-11T11:33:20.139Z [err] ERR! 2019-05-11T11:33:20.139Z [err] not ok 2019-05-11T11:33:20.139Z [err] 2019-05-11T11:33:20.140Z [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=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v57' (1) 2019-05-11T11:33:22.495Z [err] npm 2019-05-11T11:33:22.495Z [err] WARN [email protected] No repository field. 2019-05-11T11:33:22.495Z [err] npm WARN 2019-05-11T11:33:22.495Z [err] [email protected] No license field. 2019-05-11T11:33:22.496Z [err] 2019-05-11T11:33:22.505Z [err] npm 2019-05-11T11:33:22.506Z [err] ERR! code ELIFECYCLE 2019-05-11T11:33:22.506Z [err] npm 2019-05-11T11:33:22.506Z [err] ERR! errno 2019-05-11T11:33:22.506Z [err] 1 2019-05-11T11:33:22.507Z [err] npm 2019-05-11T11:33:22.507Z [err] ERR! [email protected] install:node-pre-gyp install --fallback-to-build`
2019-05-11T11:33:22.507Z [err] npm ERR!
2019-05-11T11:33:22.507Z [err] Exit status 1
2019-05-11T11:33:22.508Z [err] npm
2019-05-11T11:33:22.508Z [err] ERR!
2019-05-11T11:33:22.508Z [err]
2019-05-11T11:33:22.508Z [err] npm
2019-05-11T11:33:22.508Z [err] ERR! Failed at the [email protected] install script.
2019-05-11T11:33:22.508Z [err] npm ERR!
2019-05-11T11:33:22.508Z [err] This is probably not a problem with npm. There is likely additional logging output above.
2019-05-11T11:33:22.556Z [err]
2019-05-11T11:33:22.557Z [err] npm ERR! A complete log of this run can be found in:
2019-05-11T11:33:22.557Z [err] npm
2019-05-11T11:33:22.557Z [err] ERR! /home/pi/.npm/_logs/2019-05-11T11_33_22_532Z-debug.log
2019-05-11T11:33:22.581Z rc=1


2019-05-11T11:38:23.584Z installieren : node-red-contrib-model-asset-exchange 0.2.3

2019-05-11T11:38:23.674Z npm install --no-audit --no-update-notifier --save --save-prefix="~" --production [email protected]
2019-05-11T11:38:38.515Z [err] npm
2019-05-11T11:38:38.516Z [err] WARN deprecated [email protected]: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
2019-05-11T11:38:38.981Z [err] npm
2019-05-11T11:38:38.982Z [err] WARN deprecated [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
2019-05-11T11:38:38.987Z [err] npm
2019-05-11T11:38:38.987Z [err] WARN deprecated [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
2019-05-11T11:38:38.997Z [err] npm
2019-05-11T11:38:38.997Z [err] WARN deprecated [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
2019-05-11T11:38:39.002Z [err] npm
2019-05-11T11:38:39.003Z [err] WARN deprecated
2019-05-11T11:38:39.006Z [err] [email protected]: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
2019-05-11T11:38:39.024Z [err] npm
2019-05-11T11:38:39.024Z [err] WARN deprecated [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
2019-05-11T11:38:47.145Z [out]
2019-05-11T11:38:47.145Z [out] > [email protected] install /home/pi/.node-red/node_modules/canvas
2019-05-11T11:38:47.145Z [out] > node-pre-gyp install --fallback-to-build
2019-05-11T11:38:47.145Z [out]
2019-05-11T11:38:48.335Z [err] node-pre-gyp
2019-05-11T11:38:48.337Z [err]
2019-05-11T11:38:48.337Z [err] WARN
2019-05-11T11:38:48.337Z [err] Using request for node-pre-gyp https download
2019-05-11T11:38:48.337Z [err]
2019-05-11T11:38:49.178Z [err] node-pre-gyp
2019-05-11T11:38:49.178Z [err] WARN Tried to download(404): https://github.com/node-gfx/node-canvas-prebuilt/releases/download/v2.5.0/canvas-v2.5.0-node-v57-linux-glibc-arm.tar.gz
2019-05-11T11:38:49.178Z [err] node-pre-gyp
2019-05-11T11:38:49.178Z [err] WARN
2019-05-11T11:38:49.178Z [err] Pre-built binaries not found for [email protected] and [email protected] (node-v57 ABI, glibc) (falling back to source compile with node-gyp)
2019-05-11T11:38:52.838Z [err] Package pixman-1 was not found in the pkg-config search path.
2019-05-11T11:38:52.838Z [err] Perhaps you should add the directory containing pixman-1.pc' 2019-05-11T11:38:52.838Z [err] to the PKG_CONFIG_PATH environment variable 2019-05-11T11:38:52.838Z [err] No package 'pixman-1' found 2019-05-11T11:38:52.838Z [err] gyp: Call to 'pkg-config pixman-1 --libs' returned exit status 1 while in binding.gyp. while trying to load binding.gyp 2019-05-11T11:38:52.868Z [err] gyp 2019-05-11T11:38:52.876Z [err] ERR! configure error 2019-05-11T11:38:52.876Z [err] gyp ERR! stack Error: gypfailed with exit code: 1 2019-05-11T11:38:52.876Z [err] gyp ERR! stack at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:345:16) 2019-05-11T11:38:52.876Z [err] gyp ERR! stack at emitTwo (events.js:126:13) 2019-05-11T11:38:52.876Z [err] gyp ERR! stack at ChildProcess.emit (events.js:214:7) 2019-05-11T11:38:52.876Z [err] gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12) 2019-05-11T11:38:52.876Z [err] gyp ERR! System Linux 4.14.98-v7+ 2019-05-11T11:38:52.876Z [err] gyp ERR! command "/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=4" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v57" 2019-05-11T11:38:52.876Z [err] gyp ERR! cwd /home/pi/.node-red/node_modules/canvas 2019-05-11T11:38:52.876Z [err] gyp ERR! node -v v8.16.0 2019-05-11T11:38:52.876Z [err] gyp ERR! node-gyp -v v3.8.0 2019-05-11T11:38:52.876Z [err] gyp ERR! not ok 2019-05-11T11:38:52.888Z [err] node-pre-gyp ERR! build error 2019-05-11T11:38:52.888Z [err] node-pre-gyp ERR! stack 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=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v57' (1) 2019-05-11T11:38:52.888Z [err] node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/pi/.node-red/node_modules/node-pre-gyp/lib/util/compile.js:83:29) 2019-05-11T11:38:52.888Z [err] node-pre-gyp ERR! stack at emitTwo (events.js:126:13) 2019-05-11T11:38:52.888Z [err] node-pre-gyp ERR! stack at ChildProcess.emit (events.js:214:7) 2019-05-11T11:38:52.888Z [err] node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:915:16) 2019-05-11T11:38:52.888Z [err] node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5) 2019-05-11T11:38:52.888Z [err] node-pre-gyp ERR! System Linux 4.14.98-v7+ 2019-05-11T11:38:52.888Z [err] node-pre-gyp ERR! command "/usr/bin/node" "/home/pi/.node-red/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" 2019-05-11T11:38:52.888Z [err] node-pre-gyp ERR! cwd /home/pi/.node-red/node_modules/canvas 2019-05-11T11:38:52.888Z [err] node-pre-gyp 2019-05-11T11:38:52.892Z [err] ERR! node -v v8.16.0 2019-05-11T11:38:52.892Z [err] node-pre-gyp ERR! node-pre-gyp -v v0.11.0 2019-05-11T11:38:52.892Z [err] node-pre-gyp ERR! not ok 2019-05-11T11:38:52.893Z [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=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v57' (1) 2019-05-11T11:38:55.099Z [err] npm 2019-05-11T11:38:55.100Z [err] WARN [email protected] No repository field. 2019-05-11T11:38:55.100Z [err] npm WARN 2019-05-11T11:38:55.100Z [err] [email protected] No license field. 2019-05-11T11:38:55.100Z [err] 2019-05-11T11:38:55.105Z [err] npm 2019-05-11T11:38:55.106Z [err] ERR! code ELIFECYCLE 2019-05-11T11:38:55.106Z [err] npm 2019-05-11T11:38:55.106Z [err] ERR! errno 1 2019-05-11T11:38:55.107Z [err] npm 2019-05-11T11:38:55.107Z [err] ERR! [email protected] install:node-pre-gyp install --fallback-to-build`
2019-05-11T11:38:55.107Z [err] npm
2019-05-11T11:38:55.107Z [err] ERR!
2019-05-11T11:38:55.107Z [err] Exit status 1
2019-05-11T11:38:55.108Z [err] npm
2019-05-11T11:38:55.108Z [err] ERR!
2019-05-11T11:38:55.108Z [err]
2019-05-11T11:38:55.108Z [err] npm
2019-05-11T11:38:55.108Z [err] ERR!
2019-05-11T11:38:55.108Z [err] Failed at the [email protected] install script.
2019-05-11T11:38:55.108Z [err] npm
2019-05-11T11:38:55.108Z [err] ERR! This is probably not a problem with npm. There is likely additional logging output above.
2019-05-11T11:38:55.188Z [err]
2019-05-11T11:38:55.188Z [err] npm ERR! A complete log of this run can be found in:
2019-05-11T11:38:55.188Z [err] npm
2019-05-11T11:38:55.188Z [err] ERR! /home/pi/.npm/_logs/2019-05-11T11_38_55_128Z-debug.log
2019-05-11T11:38:55.209Z rc=1

Nodes cannot handle JSON input

During some random testing I've noticed that if JSON is passed in as input the following error message is displayed in the debug window:

TypeError: source.on is not a function

To recreate:

  • import any sample flow
  • choose a JSON document as input

some nodes are missing

Hi,
different to the description the scene-classifier and image-segmenter nodes are not included.
best regards
Uwe

Node predicts only background and not the person

Hi :-)

I'm trying to extract (predict) only image #1 as in the the following screenshot, and as in the codepen example:
image

In NR, I want to get image #1 but I get only the background image #2 as the image output (msg.payload = msg.annotatedInput):

image

Here's my flow:

[{"id":"bb289e11.8296c","type":"debug","z":"e6f8ef0e.b0109","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":590,"y":100,"wires":[]},{"id":"ad0d2487.2968a8","type":"fileinject","z":"e6f8ef0e.b0109","name":"","x":140,"y":120,"wires":[["4238d650.2698a8"]]},{"id":"ea81dbf9.5e52c8","type":"camera","z":"e6f8ef0e.b0109","name":"","x":150,"y":180,"wires":[["4238d650.2698a8"]]},{"id":"8f0d5791.7408c8","type":"comment","z":"e6f8ef0e.b0109","name":"Identify objects in an image, additionally assigning each pixel of the image to a particular object.","info":"","x":370,"y":40,"wires":[]},{"id":"4238d650.2698a8","type":"image-segmenter","z":"e6f8ef0e.b0109","service":"554ef764.f40a68","method":"predict","passthrough":true,"annotated_input":true,"predict_image":"","predict_imageType":"str","name":"","x":358,"y":120,"wires":[["bb289e11.8296c","5caa04ea.d6870c","ce09fa6c.523948"]]},{"id":"5caa04ea.d6870c","type":"function","z":"e6f8ef0e.b0109","name":"Extract Bounding Box Image Data","func":"// if the incoming message contains the annotated image\n// send it to the image output node to display\n\nmsg.payload = msg.annotatedInput;\n//msg.payload = msg.inputData;\n\n\nif (msg.payload) {\n return msg;\n}\n\n","outputs":1,"noerr":0,"x":1060,"y":80,"wires":[["c8b7992.2bd7668"]]},{"id":"c8b7992.2bd7668","type":"image","z":"e6f8ef0e.b0109","name":"","width":"300","x":1100,"y":140,"wires":[]},{"id":"e8f254e7.992708","type":"base64","z":"e6f8ef0e.b0109","name":"","action":"","property":"payload","x":720,"y":80,"wires":[[]]},{"id":"1d714315.dcdc0d","type":"image","z":"e6f8ef0e.b0109","name":"","width":"300","x":780,"y":140,"wires":[]},{"id":"ce09fa6c.523948","type":"function","z":"e6f8ef0e.b0109","name":"input","func":"// if the incoming message contains the annotated image\n// send it to the image output node to display\n\n//msg.payload = msg.annotatedInput;\nmsg.payload = msg.inputData;\n\n\nif (msg.payload) {\n return msg;\n}\n\n","outputs":1,"noerr":0,"x":410,"y":180,"wires":[["1d714315.dcdc0d"]]},{"id":"554ef764.f40a68","type":"image-segmenter-service","z":"","host":"https://max-image-segmenter.max.us-south.containers.appdomain.cloud","name":"cloud"}]

Is this a bug?

Thanks!

get_metadata tests failing for some models

Some models return responses that don't match the test cases for the get_metadata methods. For example, the human-pose-estimator and inception-resnet-v2 nodes currently fail those tests.

The test cases could be changed to a specific value, like id that would be more resistant to those types of changes moving forward.

Nodes should handle host URLs that end with '/'

If a user defines the service node and enters a host URL that ends with /, e.g. http://127.0.0.1:5000/, instead of http://127.0.0.1:5000/ the request fails. The issue is not model specific.

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.