Skip to main content


Sinapsis
Sinapsis EasyOCR

Local, lightweight OCR for multilingual image text and bounding boxes.

Overview

sinapsis-easyocr wraps the EasyOCR detector and recogniser as a Sinapsis EasyOCR Template. It reads ImagePacket objects and appends bounding-box annotations with recognised text. It can also assemble the recognised words into a TextPacket through get_full_text.

Best suited to text spotting and conventional recognition

For signs, screenshots, product labels, receipts and ordinary image text, a conventional OCR detector/recogniser is often enough. EasyOCR avoids loading a large prompt-driven vision-language model and supports CPU execution (reader_params.gpu: false) as well as GPU execution. This makes it an approachable choice when deployment size, hardware and repeatable localisation matter more than generative document interpretation.

Language support is configured with reader_params.lang_list. Detection and recognition are independent parts of the Reader, and the current Template exposes craft or dbnet18 for text detection. Results retain text and geometry inside the original DataContainer, so a downstream BBoxDrawer, cropper, indexer or storage Template can consume them.

EasyOCR does not reason about a document's semantic structure or follow open-ended extraction prompts. For complex tables, forms or schema-guided extraction, a vision-language OCR model may be more appropriate; for structured word geometry, docTR is another fit.

Installation

Requires Python 3.13+. Install the base OCR package:

uv pip install sinapsis-easyocr

To run the image-folder example below, include its OpenCV image reader:

uv pip install "sinapsis-easyocr[sinapsis-data-readers]"

Optional features and dependencies

The base installation includes the dependencies required by the package. The following extras are declared in this package’s pyproject.toml; install only those needed by your workflow. They are standard Python optional dependencies, not separate execution profiles.

Extra Adds / when to select it
sinapsis-data-readers Load external media or datasets into DataContainers. Dependencies: sinapsis-data-readers[opencv]
sinapsis-data-writers Save the resulting DataContainer content to files. Dependencies: sinapsis-data-writers
sinapsis-data-visualization Render plots or annotate results for inspection. Dependencies: sinapsis-data-visualization[visualization-matplotlib]
all Bundle declared by this package; its manifest includes sinapsis-data-readers, sinapsis-data-writers, sinapsis-data-visualization.

For example:

uv pip install "sinapsis-easyocr[sinapsis-data-readers]"

The manifest also defines development-only dependency groups: dev (pre-commit, ruff, ty). These support source development and testing and are not runtime extras.

EasyOCR Template

The Template's main Pydantic attributes are:

Attribute Meaning
reader_params.lang_list Languages to recognise, e.g. ["en", "fr"].
reader_params.gpu Whether EasyOCR should use GPU acceleration; set to false for CPU.
reader_params.detect_network craft (default) or dbnet18.
reader_params.recog_network Recognition network (default standard).
read_text_params Decoding, thresholds, beam width, paragraph grouping, and other EasyOCR readtext() options.
get_full_text Also append concatenated recognised text as a TextPacket (default false).
enable_img_resize, img_width, img_height Optional explicit resizing before OCR.

Example: image folder → OCR annotations and text

Save as my_easyocr_agent.yaml:

agent:
  name: my_easyocr_agent

templates:
  - template_name: Input
    class_name: InputTemplate
    attributes: {}

  - template_name: Images
    class_name: FolderImageDatasetCV2
    template_input: Input
    attributes:
      data_dir: dataset/input

  - template_name: OCR
    class_name: EasyOCR
    template_input: Images
    attributes:
      reader_params:
        lang_list: ["en"]
        gpu: false
      get_full_text: true

Place images in dataset/input, then execute:

sinx jobs run my_easyocr_agent.yaml

This configuration returns the same image packets enriched with detected text annotations and a concatenated text packet. For an annotated image output, continue the graph into BBoxDrawer and ImageSaver after installing the relevant visualization/writer extras.

Reference configs: basic inference and drawing demo.

Performance and output trade-offs

  • A CPU deployment is possible, but processing time grows with image resolution, number of text regions and the recogniser configuration.
  • read_text_params controls thresholding and decoding and is useful when small, slanted or low-contrast text needs tuning.
  • Enabling get_full_text gives downstream search/LLM Templates convenient text but does not replace per-word geometry when spatial position matters.
  • The first run may download pretrained weights when the model cache is empty (download_enabled controls this).

Resources

License

Sinapsis open-source components are available under your choice of the MIT License or the Apache License 2.0, unless otherwise noted.

Metadata

Release files for sinapsis-easyocr 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sinapsis-easyocr 1.0.0
File Size Uploaded Provenance Actions
sinapsis_easyocr-1.0.0.tar.gz 134.8 kB Without provenance Details for sinapsis_easyocr-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sinapsis-easyocr 1.0.0
File Interpreter ABI Platform Actions
sinapsis_easyocr-1.0.0-py3-none-any.whl Python 3 none any Details for sinapsis_easyocr-1.0.0-py3-none-any.whl

Total release size: 148.9 kB

Release files / sinapsis_easyocr-1.0.0.tar.gz

Download URL sinapsis_easyocr-1.0.0.tar.gz
Size 134.8 kB
Tags Source
SHA-256 checksum
How to use checksums
98aab47b01f4a1c7d6826263360230b67a97f7c9374d63fce2aaeba089a6c23f
BLAKE2b-256 checksum
How to use checksums
c197a23769aed6d67449f06fce25102e28387b1074c76956c335d8be0309d120
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.17

Release files / sinapsis_easyocr-1.0.0-py3-none-any.whl

Download URL sinapsis_easyocr-1.0.0-py3-none-any.whl
Size 14.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
807db6bac705c2b35f3756b12d103354e17c9c764a59b45b550fb4101ce9b9fa
BLAKE2b-256 checksum
How to use checksums
289ce21ccad5f24bd9185a4de8f2985ab81b3e3ae096b44a95db9c60bff9e77a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.17

Security for sinapsis-easyocr 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page