semvec/pypi-packages huggingface dataset:
sabhiocr 0.0.4
Awesome self rolled module to parse data from OCR Server
License: Apache License 2.0
Keywords: ocr textdetection textrecognition paddleocr crnn east star-net rosetta ocrlite db

# Table of Contents

1.  [Installation](#org4a85a89)
2.  [Usage](#orga5567ed)
    1.  [Import vretil](#org6d242ff)
    2.  [Load image](#org9f7005a)
    3.  [Use OCRDocument class](#org63a55ae)

Vretil, is an archangel briefly mentioned in the Second Book of Enoch as God&rsquo;s scribe and recordkeeper. In Enoch II, God commands Vretil to bring Enoch writing materials so he could document his journey through the heavens.

vretil is the module used to process the response of the OCR Hub server.


<a id="org4a85a89"></a>

# Installation

    
    pip install vretil


<a id="orga5567ed"></a>

# Usage


<a id="org6d242ff"></a>

## Import vretil

    from vretil.ocr_document import OCRDocument


<a id="org9f7005a"></a>

## Load image

    
    image_path = "FOO/PATH"
    
    image = open(image_path, 'rb').read()


<a id="org63a55ae"></a>

## Use OCRDocument class

    server_url = "http://0.0.0.0:8868/predict/ocr_system"
    ocr_engine = OCRDocument(server_url=server_url)
    result = ocr_engine(
        image,
        expected_document_type="cnic",
        expected_document_side="front",
        is_visualize=False
    )