Update README.md
Browse files
README.md
CHANGED
|
@@ -1,21 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
---
|
| 10 |
|
| 11 |
-
#
|
| 12 |
|
| 13 |
-
**Load:**
|
| 14 |
```python
|
| 15 |
-
from
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
| 20 |
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ShobdoOCR — Bangla-English OCR for Bangladeshi Documents
|
| 2 |
+
|
| 3 |
+
ShobdoOCR is a word-level OCR system designed for Bangladeshi government documents including NID cards, birth certificates, land deeds, and invoices. It handles mixed Bengali and English text using a classifier-first dual-recognizer architecture — a lightweight 23K-parameter script classifier (99.82% accuracy) routes each detected word to either a Bengali CRNN or English CRNN recognizer, returning per-word bounding boxes, recognized text, and script labels.
|
| 4 |
+
|
| 5 |
+
Part of the **DocReader BD** intelligent document understanding system.
|
| 6 |
+
|
| 7 |
---
|
| 8 |
+
|
| 9 |
+
## Install
|
| 10 |
+
|
| 11 |
+
```bash
|
| 12 |
+
pip install --index-url https://test.pypi.org/simple/ \
|
| 13 |
+
--extra-index-url https://pypi.org/simple/ \
|
| 14 |
+
shobdoocr==0.1.1
|
| 15 |
+
```
|
| 16 |
+
> Note: shobdoocr is currently hosted on TestPyPI (test registry).
|
| 17 |
+
> Dependencies are fetched from the official PyPI automatically.
|
| 18 |
+
|
| 19 |
---
|
| 20 |
|
| 21 |
+
## Usage
|
| 22 |
|
|
|
|
| 23 |
```python
|
| 24 |
+
from shobdoocr import OCR
|
| 25 |
+
|
| 26 |
+
ocr = OCR() # models download automatically (~80MB)
|
| 27 |
+
|
| 28 |
+
# Plain text
|
| 29 |
+
text = ocr.read_text("nid_card.jpg")
|
| 30 |
+
print(text)
|
| 31 |
|
| 32 |
+
# Word-level output with bounding boxes and script labels
|
| 33 |
+
results = ocr.read("nid_card.jpg")
|
| 34 |
+
for word in results:
|
| 35 |
+
print(word['text'], word['script'], word['box'])
|
| 36 |
+
```
|