Downloads · 30 days
14
19% of all-time downloads
moonstripe/chickenscratch-ocr
chickenscratch-ocr is a image-to-text model from moonstripe. Use it when you need a caption or text from an image. The card lists the license as mit.
Fine-tuned TrOCR model for personal handwriting recognition.
Downloads · 30 days
14
19% of all-time downloads
All-time downloads
74
Public
Parameters
334M
1.3 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors1.3 GB · 100%
From the Hugging Face model README
Fine-tuned TrOCR model for personal handwriting recognition.
from transformers import TrOCRProcessor, VisionEncoderDecoderModel
from PIL import Image
processor = TrOCRProcessor.from_pretrained("moonstripe/chickenscratch-ocr")
model = VisionEncoderDecoderModel.from_pretrained("moonstripe/chickenscratch-ocr")
# Load a handwritten line image
image = Image.open("line.png").convert("RGB")
# Process and predict
pixel_values = processor(images=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)
This model was trained using the chickenscratch-ocr pipeline, which provides: