Instructions to use GoktugD/DUSUNEN-Oku-62M-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use GoktugD/DUSUNEN-Oku-62M-v1 with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "image-to-text" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("image-to-text", model="GoktugD/DUSUNEN-Oku-62M-v1")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("GoktugD/DUSUNEN-Oku-62M-v1") model = AutoModelForMultimodalLM.from_pretrained("GoktugD/DUSUNEN-Oku-62M-v1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
DUSUNEN Oku 62M — Turkish Printed Word OCR
A compact Turkish OCR recognizer for cropped printed-word images, with full
support for ç, ğ, ı, İ, ö, ş, ü and measured results on unseen words.
Oku is a 61.6M-parameter TrOCR model. It takes a cropped image containing one printed Turkish word and generates the transcription. Pair it with a text detector when processing full documents.
Try DUSUNEN Oku in the live browser demo
Word-disjoint benchmark
Every vocabulary word occurs in only one dataset split. The 12,500-image test split therefore measures recognition of words unseen during fine-tuning. Both models use identical preprocessing and greedy decoding.
| Model | CER ↓ | Exact word accuracy ↑ |
|---|---|---|
microsoft/trocr-small-printed |
89.43% | 3.44% |
| DUSUNEN Oku 62M v1 | 0.24% | 98.39% |
- Relative CER reduction: 99.73%
- Case-insensitive exact accuracy: 98.48%
- Word error rate: 1.61%
- Invalid generated-token rate: 0.0000%
Machine-readable baseline and final results are included in
benchmark-baseline.json and benchmark-final.json. reload-validation.json
records a second evaluation after loading the saved checkpoint from disk.
Use
from PIL import Image
import torch
from transformers import TrOCRProcessor, VisionEncoderDecoderModel
model_id = "GoktugD/DUSUNEN-Oku-62M-v1"
processor = TrOCRProcessor.from_pretrained(model_id)
model = VisionEncoderDecoderModel.from_pretrained(model_id)
image = Image.open("cropped_turkish_word.png").convert("RGB")
pixel_values = processor(images=image, return_tensors="pt").pixel_values
with torch.inference_mode():
generated = model.generate(pixel_values, max_length=32)
print(processor.batch_decode(generated, skip_special_tokens=True)[0])
Training and reproducibility
- Base revision:
04e994ab854b0089d4929f48c2b4dbe2ce78a340 - Dataset revision:
79919774c595fcaa0be2feda583fec4cca6f5d2a - Data: 225,000 train / 2,500 validation / 12,500 test
- Optimizer: AdamW, linear schedule, 5% warmup,
3e-5 - Effective batch size: 32; one epoch; BF16; seed 42
- Image size: 384×384; maximum target length: 32 tokens
- Hardware: NVIDIA GeForce RTX 5060 Laptop GPU 8 GB
- Recorded training time: 2940.4 seconds
- Exact training program:
train_oku_ocr.py
Scope and limitations
- The benchmark images are synthetic. It does not establish accuracy on camera photos, handwriting, scans, receipts, historical print or arbitrary fonts.
- Training labels contain Turkish letters only: no digits, punctuation or multi-word lines. Use Oku on cropped word images, not full pages.
- OCR output can be wrong. Human review is required for legal, medical, financial or identity documents.
- The training dataset is CC BY-SA 4.0. This derivative release preserves that
license; see
LICENSEfor attribution and upstream notes.
Integrity
model.safetensors SHA-256: 601e981bb45c0cf56edd0441097c151c7855a60a738ff8e0d3db493dadacdffe
Developed and released by Göktuğ Düşünen.
- Downloads last month
- 73
Model tree for GoktugD/DUSUNEN-Oku-62M-v1
Base model
microsoft/trocr-small-printedDataset used to train GoktugD/DUSUNEN-Oku-62M-v1
Spaces using GoktugD/DUSUNEN-Oku-62M-v1 2
Collection including GoktugD/DUSUNEN-Oku-62M-v1
Evaluation results
- Character error rate on Turkish Word OCR word-disjoint testtest set self-reported0.245
- Exact word accuracy on Turkish Word OCR word-disjoint testtest set self-reported98.392

