Lola Vision icon

Lola Vision

Basic Lola Sample Node

Lola Vision

AI-generated

Overview

The Lola Vision node is designed to process images using various computer vision and OCR (Optical Character Recognition) algorithms. It supports tasks such as image labeling, face extraction, biometric face matching, and extracting information from identity documents (including US driver licenses and passports). The node can accept images in multiple formats (base64, URL, or store key) and provides flexible options for different use cases.

Common scenarios where this node is beneficial:

  • Automatically labeling objects in images for content moderation or cataloging.
  • Extracting faces from images for biometric verification or user authentication.
  • Matching two faces to verify identity.
  • Performing OCR on generic documents or specific ID types (e.g., US driver license).
  • Classifying US ID documents as either a driver license or passport.

Practical examples:

  • Automating KYC (Know Your Customer) processes by extracting and verifying data from submitted ID images.
  • Building chatbots that can analyze and respond to images sent by users.
  • Integrating with security systems to match faces from surveillance footage.

Properties

Name Meaning
User Identifier An identifier to associate the request with a specific user or chat session.
Chat Identifier An identifier to track the chat session related to the image processing request.
Message Identifier A message identifier to track the specific message within the chat session.
tracerId A secondary message identifier for tracking purposes.
Algorithm Selects the processing algorithm:
- Biometrics - Extract Face
- Biometrics - Face Match
- Labeling
- OCR - Any Document
- OCR - Classify US ID Documents
- OCR - Generic ID
- OCR - US Driver License
- OCR - US Passport
Enable Encodings (Only for Biometrics - Extract Face/Face Match) Whether to enable additional encoding outputs for biometric processing.
ID Country (Only for OCR - Generic ID) Specifies the country of the ID document being processed.
ID Type (Only for OCR - Generic ID) Specifies the type of the ID document.
Image 1 (Base64) The first image to process, provided as a base64-encoded string.
Image 2 (Base64) (Only for Biometrics - Face Match) The second image to process, provided as a base64-encoded string.
Image 1 (Store Key) Reference key for the first image if stored elsewhere.
Image 1 (URL) (For several algorithms) URL to the first image to process.
Image 2 (Store Key) (Only for Biometrics - Face Match) Reference key for the second image if stored elsewhere.
Image 2 (URL) (For several algorithms) URL to the second image to process.

Output

  • The main output (json field) will contain a property named lola_vision, which holds the result of the selected algorithm.
  • The structure of lola_vision depends on the chosen algorithm:
    • For Labeling: Likely an array of labels with associated scores.
    • For OCR: Extracted text or structured fields from the document.
    • For Biometrics: Base64-encoded face images or matching results.
    • For Errors: If an error occurs (e.g., unimplemented operation), lola_vision will contain an error object describing the issue.

Example output:

{
  "lola_vision": {
    "labels": [
      {"name": "cat", "score": 0.98},
      {"name": "animal", "score": 0.95}
    ]
  }
}

or

{
  "lola_vision": {
    "fields": {
      "Name": "John Doe",
      "ID Number": "123456789"
    }
  }
}

or, in case of error:

{
  "lola_vision": {
    "error": {
      "message": "Not implemented yet"
    }
  }
}

If binary data is returned (e.g., extracted face images), it will be encoded as base64 within the JSON.


Dependencies

  • May require a credential named lolaKeyApi (optional, depending on configuration).
  • Relies on external functions (not shown here) for actual image processing and OCR.
  • No explicit environment variables are required based on static analysis.

Troubleshooting

Common issues:

  • Missing or invalid input: Required fields like "User Identifier" or "Chat Identifier" must be provided.
  • Unsupported operation: Selecting "OCR - US Passport" will throw a "Not implemented yet" error.
  • Invalid image format: Images must be valid base64 strings or accessible URLs.
  • Algorithm mismatch: Some properties only apply to certain algorithms; ensure correct combinations.

Error messages:

  • "Not implemented yet": The selected operation (e.g., "OCR - US Passport") is not available. Choose another algorithm.
  • Errors in lola_vision.error: Check the error message for details about what went wrong (e.g., missing parameters, failed image decoding).

Links and References


Discussion