ocr_service_skill

This skill performs high-precision OCR on images, supports multiple languages and formats, and returns text, coordinates, and confidence scores for document
  • Python

7

GitHub Stars

4

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill lin-a1/skills-agent --skill ocr_service

  • client.py2.5 KB
  • Dockerfile1.7 KB
  • server.py4.2 KB
  • SKILL.md1.1 KB

Overview

This skill provides a high-precision optical character recognition (OCR) service for extracting text from images. It supports multiple languages and image formats, returns detected text with bounding polygon coordinates and confidence scores, and is designed for document digitization and image content analysis. The service includes a health-check endpoint and simple client functions for image conversion and OCR invocation.

How this skill works

The client sends base64-encoded images to the OCR service, which performs text detection and recognition. The service returns a structured result containing preprocessor info (e.g., rotation), detected text polygons, recognized text strings, and per-item confidence scores. Consumers can use the polygon coordinates to map text back onto the original image or to crop regions for downstream processing.

When to use it

  • Digitizing scanned documents, receipts, invoices, forms, or printed reports.
  • Extracting text from photos for indexing, search, or automated data entry.
  • Analyzing images with mixed-language content or multi-format image inputs.
  • Preprocessing images for NLP pipelines that require positional context.
  • Automating verification tasks by extracting text plus confidence for validation.

Best practices

  • Provide well-lit, high-resolution images and avoid heavy compression to improve accuracy.
  • Use the doc_preprocessor_res angle to deskew images before downstream layout tasks.
  • Filter recognized items by rec_scores to reduce false positives in critical workflows.
  • Map dt_polys back to the original image to validate spatial relationships or extract subregions.
  • Batch images and reuse a single client instance to reduce connection overhead.

Example use cases

  • Convert bulk scanned contracts into searchable text and preserve layout by storing dt_polys.
  • Extract line items and totals from photographed receipts for expense automation using rec_scores to trust high-confidence items.
  • Detect and transcribe signage or labels in multi-language street or product photos for indexing.
  • Preprocess and crop fields from forms using polygon coordinates, then pass crops to specialized parsers.
  • Run a health check before large jobs to ensure the OCR endpoint is reachable and functioning.

FAQ

rec_scores is the per-text confidence value (0–1). Use a threshold to filter low-confidence results or surface them for manual review.

How do I handle rotated or skewed images?

Check doc_preprocessor_res.angle to detect rotation. Deskew using that angle or reorient the image before downstream layout-sensitive processing.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational