dsmchr/trocr_russian_18th_century_printed
0429
TrOCR Base for 18th-Century Russian Printed Texts
This model is a fine-tuned version of **microsoft/trocr-base-printed** for optical character recognition (OCR) of historical Russian printed texts from the eighteenth century.
Intended Use
The model is designed for recognizing printed Russian texts with prereform orthography, including historical character forms and typographic features typical of eighteenth-century publications.
Base-usage
from PIL import Image
from transformers import TrOCRProcessor, VisionEncoderDecoderModel
hf_model = VisionEncoderDecoderModel.from_pretrained("dsmchr/trocr_russian_18th_century_printed")
image = Image.open("./path/to/your/image")
processor = TrOCRProcessor.from_pretrained("microsoft/trocr-base-printed")
pixel_values = processor(images=image, return_tensors="pt").pixel_values
generated_ids = hf_model.generate(pixel_values)
generated_text = processor.batch_decode(generated_ids, skip_special_tokens=True)[0]
print(generated_text)Training Dataset
The model was fine-tuned on a custom OCR dataset containing 14,911 manually aligned text lines.
The dataset was compiled from Russian printed books of various genres and printing houses, predominantly published during the second half of the eighteenth century. Ground-truth transcriptions preserve the original historical spelling.
