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:
node cli.js --list
Execute Specific Method
To run a specific method on an image:
node cli.js 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.
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);
}
})();