Skip to main content

NanoOCR 🚀

A lightning-fast, production-ready Convolutional Recurrent Neural Network (CRNN) OCR engine optimized for edge devices.

Built from scratch, trained on over 2.3 million synthetic and real-world images, and packaged into a tiny 18.3 MB footprint.

Features

  • Ultra-Lightweight: 4.8M parameters, under 20 MB on disk.
  • Blazing Fast: 1.74 ms latency (~575 FPS) on a T4 GPU.
  • Dual-Domain Mastery: Bridged the gap between synthetic data (MJSynth) and messy real-world photography (IIIT5K).
  • High Accuracy: 78.37% exact match and 8.56% Character Error Rate (CER) on real-world scene text.

Installation

pip install nano-ocr

Quick Start

from nano_ocr import NanoOCR

# Initialize the engine (automatically loads the bundled 18MB ftr weights)
ocr = NanoOCR()

# 1. Standard Read
text = ocr.read("image.png")
print(text)
# Output: Hello World

# 2. Detailed Prediction (Confidence & Latency)
result = ocr.predict("image.png")
print(result)
# Output:
# Text: Hello World
# Confidence: 0.94
# Time: 31.2 ms

# 3. Batch Processing
images = ["img1.png", "img2.png", "img3.png"]
results = ocr.read_batch(images)
print(results)

# 4. System Hardware Benchmark
ocr.benchmark()

Architecture

NanoOCR utilizes a 7-layer VGG-style CNN for feature extraction (with asymmetric max-pooling), a Bidirectional LSTM (256 hidden size) for sequence context, and CTC loss for decoding.

Author

Developed by Arshvir

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nano_ocr-0.1.0.tar.gz (17.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nano_ocr-0.1.0-py3-none-any.whl (17.9 MB view details)

Uploaded Python 3

File details

Details for the file nano_ocr-0.1.0.tar.gz.

File metadata

  • Download URL: nano_ocr-0.1.0.tar.gz
  • Upload date:
  • Size: 17.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for nano_ocr-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8ada336263191f2fb1ef3d378b08022851d70b2395776e396a9e435d6933b343
MD5 318d2b989ea1ac5f433abaa47c27a575
BLAKE2b-256 ba5c0bd27648f0844d8ce9f30f6b7088130e43a75c491e3c1ec40fc8435be29e

See more details on using hashes here.

Provenance

The following attestation bundles were made for nano_ocr-0.1.0.tar.gz:

Publisher: publish.yml on avarshvir/nano-ocr

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nano_ocr-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: nano_ocr-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.9 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for nano_ocr-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7246e23c29ded72b5808e09f18c5954184c71f664deb025ed52dde248eee0eff
MD5 dc2424aebf255baa07a8abddff5176cf
BLAKE2b-256 cc87a0e3972df1b208e97215e12f523701fc0ab909f9cf6289c897523c1da324

See more details on using hashes here.

Provenance

The following attestation bundles were made for nano_ocr-0.1.0-py3-none-any.whl:

Publisher: publish.yml on avarshvir/nano-ocr

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

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