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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ada336263191f2fb1ef3d378b08022851d70b2395776e396a9e435d6933b343
|
|
| MD5 |
318d2b989ea1ac5f433abaa47c27a575
|
|
| BLAKE2b-256 |
ba5c0bd27648f0844d8ce9f30f6b7088130e43a75c491e3c1ec40fc8435be29e
|
Provenance
The following attestation bundles were made for nano_ocr-0.1.0.tar.gz:
Publisher:
publish.yml on avarshvir/nano-ocr
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nano_ocr-0.1.0.tar.gz -
Subject digest:
8ada336263191f2fb1ef3d378b08022851d70b2395776e396a9e435d6933b343 - Sigstore transparency entry: 2816490534
- Sigstore integration time:
-
Permalink:
avarshvir/nano-ocr@abde1b151ddcd0c533cd05f626a2e4155a65ef0a -
Branch / Tag:
refs/heads/main - Owner: https://github.com/avarshvir
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@abde1b151ddcd0c533cd05f626a2e4155a65ef0a -
Trigger Event:
workflow_dispatch
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7246e23c29ded72b5808e09f18c5954184c71f664deb025ed52dde248eee0eff
|
|
| MD5 |
dc2424aebf255baa07a8abddff5176cf
|
|
| BLAKE2b-256 |
cc87a0e3972df1b208e97215e12f523701fc0ab909f9cf6289c897523c1da324
|
Provenance
The following attestation bundles were made for nano_ocr-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on avarshvir/nano-ocr
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nano_ocr-0.1.0-py3-none-any.whl -
Subject digest:
7246e23c29ded72b5808e09f18c5954184c71f664deb025ed52dde248eee0eff - Sigstore transparency entry: 2816490599
- Sigstore integration time:
-
Permalink:
avarshvir/nano-ocr@abde1b151ddcd0c533cd05f626a2e4155a65ef0a -
Branch / Tag:
refs/heads/main - Owner: https://github.com/avarshvir
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@abde1b151ddcd0c533cd05f626a2e4155a65ef0a -
Trigger Event:
workflow_dispatch
-
Statement type: