Downloads · 30 days
17
6% of all-time downloads
WARAJA/Tzefa-Word-OCR-TrOCR
Tzefa-Word-OCR-TrOCR is a image-to-text model from WARAJA. Use it when you need a caption or text from an image. It is set up for transformers. The card lists the license as cc-by-nc-3.0.
Fine-tuned TrOCR model for recognizing individual handwritten Tzefa keywords.
Downloads · 30 days
17
6% of all-time downloads
All-time downloads
286
Public
Parameters
61.6M
738 MB on disk
Likes
1
Public
Click a slice to open those files.
.pt492 MB · 67%
From the Hugging Face model README
Fine-tuned TrOCR model for recognizing individual handwritten Tzefa keywords.
microsoft/trocr-small-stage1VisionEncoderDecoderModel)Tzefa keywords include:
from transformers import TrOCRProcessor, VisionEncoderDecoderModel
from PIL import Image
# use_fast=False is required to prevent tokenizer conversion crash
processor = TrOCRProcessor.from_pretrained("microsoft/trocr-small-stage1", use_fast=False)
model = VisionEncoderDecoderModel.from_pretrained("WARAJA/Tzefa-Word-OCR-TrOCR")
image = Image.open("word_crop.png").convert("RGB")
pixel_values = processor(image, return_tensors="pt").pixel_values
generated_ids = model.generate(pixel_values)
text = processor.batch_decode(generated_ids, skip_special_tokens=True)[0]
print(text)