
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
watson-visual-recognition-utils
Advanced tools
Command Line Interface and NPM module for easily creating/updating Watson Visual Recognition customer classifiers.
Command Line Interface for quickly and easily interacting with the Watson Visual Recognition service & custom classifiers.
Make sure you read the documentation for Visual Recognition before using this library.
You must have a valid Visual Recognition key to use this tool. If you do not have one, you can get a free trial here.
npm install watson-visual-recognition-utils -g
Run either the command watson-visual-recognition-utils or wvru in the terminal (both are aliases to the same code), you should see something like this:
$ watson-visual-recognition-utils
Watson Visual Recognition - Custom Classifier Utilities
Usage: <command> [options]
Commands:
api-usage [options] View IBM Watson Visual Recognition API Key usage and limits
classifier-list [options] List all custom classifiers
classifier-detail [options] Fetch custom classifier verbose details
classifier-classify [options] Classify an image
classifier-create [options] Create a new custom classifier
classifier-delete [options] Delete a custom classifier
key-set <key> Save your Watson Visual Recognition key in CLI preferences
key-unset Remove your Watson Visual Recognition key in CLI preference
Options:
-h, --help output usage information
-V, --version output the version number
You can either pass the Visual Recognition key as a CLI parameter, or save it in encrypted preferences so it does not need to be passed with every invocation.
This will call the list command, using the API key as a CLI argument:
watson-visual-recognition-utils classifier-list --key YOUR_WATSON_KEY_HERE
-OR-
First, set the key in preferences
watson-visual-recognition-utils key-set YOUR_WATSON_KEY_HERE
Next, call the list command (key is saved for all subsequent actions)
watson-visual-recognition-utils classifier-list
Invoke the classifier-create command. You can specify multiple positive classes, and optionally a negative collection of images, per service specs at: https://www.ibm.com/watson/developercloud/doc/visual-recognition/classifiers-tutorials.shtml
watson-visual-recognition-utils classifier-create
--positive-class (string for class name) and --positive-path (path to zip file for positive images).One positive and one negative:
watson-visual-recognition-utils classifier-create --name classifier_name --positive-class rust --positive-path ./positive.zip --negative-path ./negative.zip
Multiple positive classes and a negative:
watson-visual-recognition-utils classifier-create --name train_parts --positive-class wheels --positive-path ./positive-wheels.zip --positive-class rails --positive-path ./positive-rails.zip --positive-class springs --positive-path ./positive-springs.zip --negative-path ./negative-other.zip
Invoke the classify command:
watson-visual-recognition-utils classifier-classify
With CLI arguments:
watson-visual-recognition-utils classifier-classify --image ./path/to/image.jpg --classifier_ids default,rust,cracks
Output from the classify service will be displayed as a JSON object.
This sample code is licensed under Apache 2.0.
See CONTRIBUTING.
Find more open source projects on the IBM Github Page
FAQs
Command Line Interface and NPM module for easily creating/updating Watson Visual Recognition customer classifiers.
The npm package watson-visual-recognition-utils receives a total of 1 weekly downloads. As such, watson-visual-recognition-utils popularity was classified as not popular.
We found that watson-visual-recognition-utils demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.