Tzefa Word OCR TrOCR
Fine-tuned TrOCR model for recognizing individual handwritten Tzefa keywords.
Fonte do modelo
- Tipo
- Other
- Tamanho do arquivo
- 235 MB
- Versão
- vRevision 4432d4e
- Atualizado
- 18 de set. de 2026
- Downloads
- 12
- Fonte
- Hugging Face
Descrição da fonte
Tzefa Word OCR Model (Fine-tuned TrOCR)
Fine-tuned TrOCR model for recognizing individual handwritten Tzefa keywords.
Architecture
- Base model:
microsoft/trocr-small-stage1 - Fine-tuned on: Handwritten Tzefa keywords (uppercase Hebrew programming commands, number words, variable names)
- Framework: HuggingFace Transformers (
VisionEncoderDecoderModel)
Vocabulary
Tzefa keywords include:
- Commands: MAKEINTEGER, MAKESTR, MAKELIST, MAKEBOOL, PRINTINTEGER, PRINTSTR, ADD, SUBTRACT, MULTIPLY, DIVIDE, WHILETRUE, IFTRUE, etc.
- Number words: ZERO through ONEHUNDRED
- User-defined variable names
Usage
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)
Related
Fontes
1 fonte
Fontes
1 fonteVerificado 3 de set.
Artefatos de modelo
1 artefato
Artefatos de modelo
1 artefatoTrechos de fonte
2 trechos
Trechos de fonte
2 trechos--- license: cc-by-nc-3.0 pipeline_tag: image-to-text tags: - vision - ocr - trocr - transformers - handwriting-recognition - document-processing --- # Tzefa Word OCR Model (Fine-tuned TrOCR) Fine-tuned TrOCR model for recognizing individual handwritten Tzefa keywords. ## Architecture - **Base model:** `microsoft/trocr-small-stage1` - **Fine-tuned on:** Handwritten Tzefa keywords (uppercase Hebrew programming commands, number words, variable names) - **Framework:** HuggingFace Transformers (`VisionEncoderDecoderModel`) ## Vocabulary Tzefa keywords include: - **Commands:** MAKEINTEGER, MAKESTR, MAKELIST, MAKEBOOL, PRINTINTEGER, PRINTSTR, ADD, SUBTRACT, MULTIPLY, DIVIDE, WHILETRUE, IFTRUE, etc. - **Number words:** ZERO through ONEHUNDRED - **User-defined variable names** ## Usage ```python 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) ``` ## Related - [Full Tzefa Pipeline](https://huggingface.co/spaces/WARAJA/Tzefa) - [OCR Demo](https://huggingface.co/spaces/WARAJA/Tzefa-OCR) - [Word OCR Dataset](https://huggingface.co/datasets/WARAJA/Tzefa-Word-OCR-Dataset)
Source context: 12 downloads · 1 likes · Pipeline image-to-text · Library transformers · Repo WARAJA/Tzefa-Word-OCR-TrOCR
