Ir para o conteúdo
ModelListadosExterno
Baixar

Tzefa Word OCR TrOCR

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

TipoOtherVersãoRevision 4432d4eCnota

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
Hugging FacePrimárioVersão 4432d4ed7139bee3e1d26ca8c0b57107f949233f
huggingface.co/WARAJA/Tzefa-Word-OCR-TrOCR/tree/4432d4ed7139bee3e1d26ca8c0b57107f949233f

Verificado 3 de set.

Artefatos de modelo

1 artefato

model.safetensors

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

Download file

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