Saltar al contenido
ModelPublicadoExterno
Descargar

Tzefa Word OCR TrOCR

Fine-tuned TrOCR model for recognizing individual handwritten Tzefa keywords.

TipoOtherVersiónRevision 4432d4eCcalidad

Fuente del modelo

Tipo
Other
Tamaño del archivo
235 MB
Versión
vRevision 4432d4e
Actualizado
18 sept 2026
Descargas
12
Fuente
Hugging Face

Descripción de la fuente

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

Fuentes

1 fuente
Hugging FacePrincipalVersión 4432d4ed7139bee3e1d26ca8c0b57107f949233f
huggingface.co/WARAJA/Tzefa-Word-OCR-TrOCR/tree/4432d4ed7139bee3e1d26ca8c0b57107f949233f

Verificado 3 sept

Artefactos del modelo

1 artefacto

model.safetensors

safetensors · 235 MB · SHA-256 e94e83c4e17b…b9fa · Hugging Face

Download file

Extractos de fuentes

2 extractos

--- 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