Metadata-Version: 2.4
Name: arjuna-ocr
Version: 1.2.1
Summary: Arjuna-OCR [Kn&En]: layout-aware Kannada + English document OCR (ONNX Runtime, optional TensorRT)
Author: Chethan (anandkaman)
License: Apache-2.0
Project-URL: Homepage, https://huggingface.co/anandkaman/arjuna-ocr
Project-URL: Models, https://huggingface.co/anandkaman/arjuna-ocr
Project-URL: Releases, https://huggingface.co/anandkaman/arjuna-ocr-kn-en
Project-URL: Demo, https://huggingface.co/spaces/anandkaman/arjuna_ocr_demo
Keywords: ocr,kannada,document-ai,layout-analysis,onnx,tensorrt,indic
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Image Recognition
Classifier: Topic :: Text Processing :: Linguistic
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: onnxruntime>=1.20
Requires-Dist: numpy
Requires-Dist: opencv-python-headless
Requires-Dist: pyclipper
Requires-Dist: shapely
Requires-Dist: pyyaml
Requires-Dist: regex
Requires-Dist: onnx
Requires-Dist: huggingface_hub>=0.23
Provides-Extra: gpu
Requires-Dist: onnxruntime-gpu>=1.20; extra == "gpu"
Provides-Extra: trt
Requires-Dist: onnxruntime-gpu>=1.20; extra == "trt"
Requires-Dist: tensorrt>=10.0; extra == "trt"
Provides-Extra: server
Requires-Dist: fastapi>=0.110; extra == "server"
Requires-Dist: uvicorn>=0.29; extra == "server"
Requires-Dist: python-multipart; extra == "server"
Provides-Extra: pdf
Requires-Dist: pypdfium2>=4.0; extra == "pdf"
Provides-Extra: cpu
Requires-Dist: onnxruntime>=1.20; extra == "cpu"
Provides-Extra: all
Requires-Dist: onnxruntime-gpu>=1.20; extra == "all"
Requires-Dist: tensorrt>=10.0; extra == "all"
Requires-Dist: fastapi>=0.110; extra == "all"
Requires-Dist: uvicorn>=0.29; extra == "all"
Requires-Dist: python-multipart; extra == "all"
Requires-Dist: pypdfium2>=4.0; extra == "all"
Dynamic: license-file

# Arjuna-OCR [Kn&En]

Layout-aware **Kannada + English** document OCR: a layout model, a text detector and a CTC recognizer in ONNX, with
tables, reading order, per-line confidence and review flags. No language model, no GPU required.

```bash
pip install arjuna-ocr          # CPU, works anywhere


arjuna doctor                   # what this machine can do and what the pipeline will use
arjuna ocr page.pdf -o out/     # files, folders, globs or PDFs -> JSON / Markdown / hOCR / ALTO / TSV
arjuna serve --port 8080        # HTTP server
```

```python
from kanen_infer import KanEnOCR
ocr = KanEnOCR()            # detects hardware, configures itself
doc = ocr.page("page.png")  # kanen-ocr/1.0 JSON
print(ocr.render(doc, "md"))
```

The models (~170 MB) download once from [anandkaman/arjuna-ocr](https://huggingface.co/anandkaman/arjuna-ocr) at the
revision matching this package version, and are cached. Point `ARJUNA_MODELS` at a local copy for air-gapped installs.

**Speed and accuracy.** 12.8 pages/s on an RTX 5060 Ti with TensorRT, ~4.6 on the CUDA provider, seconds per page on CPU.
On a frozen 40-page private-document set: word F1 0.967, page CER 3.1 %; 96.3 % word accuracy on Mozhi, 93.7 % on MILE.
TensorRT engines are built in the background on first use — the pipeline serves immediately on CUDA and swaps each engine
in only after it reproduces the output of the session it replaces.

Full documentation, hosted-inference instructions and the evaluation record: the model repositories linked above.
**Licences**: code, recognizer and detector Apache-2.0; the layout model is AGPL-3.0 (see its NOTICE).
