ai-forever/school_notebooks_RU
Updated • 307 • 18
Handwritten word-level OCR (HWR) model for Russian.
This model is intended for recognizing cropped text snippets / single words from handwritten notebook images (not full-page OCR, use e.g. kotmayyaka/hwr_text_detection_rus).
For best results, feed tight word crops (or short token crops) with minimal surrounding background.
ocr_model.ckpthwr_ocr.py — HWRTextOCR class (load + preprocess + decode)inference.py — CLI examplepip install torch torchvision pillow
python inference_ocr.py --image /path/to/word_crop.png --checkpoint ocr_model.ckpt
from PIL import Image
from hwr_ocr import HWRTextOCR
ocr = HWRTextOCR(checkpoint_path="ocr_model.ckpt", device="cpu")
img = Image.open("word_crop.png").convert("RGB")
text = ocr.predict(img)
print(text)
Metrics reported in the model card header were obtained on an internal mixed validation split based on: