Add N'Ko Tesseract models v1+v2 (LFS) and model card
Browse filesFirst usable open-source N'Ko OCR models (v2: 6.26% CER). GPLv3.
- .gitattributes +2 -0
- README.md +51 -0
- nko-v1.traineddata +3 -0
- nko-v2.traineddata +3 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
nko-v1.traineddata filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
nko-v2.traineddata filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- nqo
|
| 4 |
+
license: gpl-3.0
|
| 5 |
+
tags:
|
| 6 |
+
- nko
|
| 7 |
+
- ocr
|
| 8 |
+
- tesseract
|
| 9 |
+
- image-to-text
|
| 10 |
+
- nko-script
|
| 11 |
+
- bambara
|
| 12 |
+
- mali
|
| 13 |
+
- low-resource
|
| 14 |
+
pipeline_tag: image-text-to-text
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
+
# nko-ocr — Tesseract LSTM models for N'Ko (ߒߞߏ) OCR
|
| 18 |
+
|
| 19 |
+
Tesseract LSTM models for **N'Ko** optical character recognition — the writing system of Manding languages (Bambara, Maninka, Dioula), spoken by ~50 million people in West Africa. First usable open-source N'Ko OCR (the official Tesseract `nko.traineddata` produced empty output on N'Ko text).
|
| 20 |
+
|
| 21 |
+
By [Fousseyni Diarra](https://github.com/koussedia) — Bamako, Mali. GPLv3.
|
| 22 |
+
|
| 23 |
+
## Models
|
| 24 |
+
|
| 25 |
+
| File | CER | WER | Notes |
|
| 26 |
+
|------|-----|-----|-------|
|
| 27 |
+
| `nko-v2.traineddata` (recommended) | **6.26%** | **17.85%** | v1 + 4,000 targeted images (diacritics, N'Ko digits, 2 fonts) + 2,856-word dictionary wordlist, 32k iterations |
|
| 28 |
+
| `nko-v1.traineddata` | 15.84% | 34.84% | 914 pure-N'Ko images, 18k iterations |
|
| 29 |
+
|
| 30 |
+
Measured with `lstmeval` on the same 92-line held-out test set (~94% of characters correct with v2).
|
| 31 |
+
|
| 32 |
+
## Quickstart
|
| 33 |
+
|
| 34 |
+
```bash
|
| 35 |
+
# Tesseract >= 5.0, N'Ko model files in ./ (or --tessdata-dir)
|
| 36 |
+
tesseract page.png output.txt -l nko-v2 --tessdata-dir ./
|
| 37 |
+
|
| 38 |
+
# single text line
|
| 39 |
+
tesseract line.png stdout -l nko-v2 --tessdata-dir ./ --psm 6
|
| 40 |
+
```
|
| 41 |
+
|
| 42 |
+
Notes:
|
| 43 |
+
- Input works best at **≥120 DPI** (upscale lower-resolution renders first).
|
| 44 |
+
- N'Ko is right-to-left; the models were trained with RTL handling.
|
| 45 |
+
- Printed text only — handwriting is **not** supported. Human review required for critical documents.
|
| 46 |
+
|
| 47 |
+
## Links
|
| 48 |
+
|
| 49 |
+
- GitHub (full project: corpus, wordlist, training notes): https://github.com/koussedia/nko-ocr
|
| 50 |
+
- Live demo: https://huggingface.co/spaces/koussedia/nko-ocr-demo
|
| 51 |
+
- Dataset (4,422 image/text pairs): https://huggingface.co/datasets/koussedia/nko-ocr-dataset
|
nko-v1.traineddata
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9daef9f64338e5e7ce158a235bd55e795b0bf69eb7c68cf7cfc99de83a563fba
|
| 3 |
+
size 3226937
|
nko-v2.traineddata
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4394b8265afafa9d83518e58dd11ff60e98092d2fe21d09586fb03ee55baaa41
|
| 3 |
+
size 3283298
|