npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

visionlit

v1.0.3

Published

Visionlit is a JavaScript library designed for advanced computer vision tasks. It offers a comprehensive API that can be easily integrated into JavaScript applications for a variety of operations, including image segmentation, colorization, face ID verifi

Downloads

9

Readme

Visionlit Package

Overview

Visionlit is a JavaScript package designed for advanced computer vision tasks. It provides a robust command-line interface and can be seamlessly integrated into Node.js applications for a variety of operations including image segmentation, colorization, face ID verification, and smart object detection.

For more information and live examples, please visit our web platform at myvisionlit.com.

To interact with the methods provided by Visionlit, you will need to create an account on this platform to obtain an API key.

Features

  • Image Segmentation: Implement custom segmentation masks.
  • Black and White Conversion: Convert color images or videos into grayscale.
  • Colorization: Reintroduce color into grayscale images using machine learning.
  • Smart Object Detection: Detect and identify objects within images, with options for custom display styles and color filters.
  • Face ID Verification: Compare faces between two images to verify identity, useful in security and authentication.
  • Identity Data Extraction: Extract and classify identity data from ID cards for specific supported countries.

Installation

To install Visionlit, run the following command:

npm install visionlit

Usage

Command Line Interface

List Available Methods

To display all executable methods:

visionlit list

Execute Specific Method

To run a specific method on an image:

visionlit run <api_key> <image_path> <method_name> [--display] [--confidence] [--option] [--color] [--country] [--to_compare]

Parameters:

  • api_key: Your API key for authentication.
  • image_path: Path to the image file.
  • method_name: The name of the method to execute.
  • display: Type of display for detection results (e.g., Boxes, Masks).
  • confidence: Confidence level for detection accuracy.
  • option: Specific processing options.
  • color: Color filter for object detection in "Masks" display type.
  • country: Country code for ID card processing.
  • to_compare: Path to an additional image file for face comparison.

Using the Help Command

To access the help for the run command:

visionlit run --help

This command will output the usage instructions, along with descriptions for each parameter and option related to the run command. This is extremely useful for understanding what parameters and options are available and how to properly format the command.

What to Expect

When you run visionlit run --help, you should see output similar to this:

visionlit run <key> <imagePath> <method>

Run Visionlit operations.

Positionals:
  key         API key for authentication. Visit https://myvisionlit.com/dashboard/account to obtain your API key.
  imagePath   Path to the image file or directory containing images.
  method      Method to execute on the image.

Options:
  --display   Type of display for detection results. Options: <Boxes>, <Masks> [default: Boxes]
  --confidence Confidence level for detection accuracy [default: 0.25]
  --option    Option for processing [default: 0]
  --color     Filter objects with colors close to the specified color. Provide color as hexadecimal.
  --country   Country code for ID card processing.
  --to_compare Path to an additional image file where the face to be compared is located.
  --help, -h  Show help  [boolean]

As a Node.js Module

Example of using Visionlit in a Node.js script:

const Visionlit = require('visionlit');

(async () => {
    const key = "your_api_key_here";
    const vision = new Visionlit(key);
    try {
        const result = await vision.segmentImage("path/to/your/image.jpg");
        console.log(result);
    } catch (error) {
        console.error(error.message);
    }
})();

### Example Usage with commands 

```bash
visionlit run your_api_key path/to/your/image.jpg smartObjectDetection --display Boxes --confidence 0.5